]> git.ipfire.org Git - thirdparty/cups.git/log
thirdparty/cups.git
23 months agoscheduler/conf.c: Print to stderr if we don't open cups-files.conf 777/head
Zdenek Dohnal [Fri, 1 Sep 2023 15:11:54 +0000 (17:11 +0200)] 
scheduler/conf.c: Print to stderr if we don't open cups-files.conf

In case cupsd can't open the cups-files.conf, the error message is lost
if journal and syslog don't exist or work on system (usually in
containers).

Log the error into stderr at this place to get the error message if
needed.

23 months agoAdd image/urf and image/pwg-raster filters for test server (for testing AirPrint...
Michael R Sweet [Thu, 10 Aug 2023 21:30:29 +0000 (17:30 -0400)] 
Add image/urf and image/pwg-raster filters for test server (for testing AirPrint/IPP Everywhere compatibility.

2 years agoFix a bug in the copy stack code (Issue #768)
Michael R Sweet [Wed, 2 Aug 2023 12:26:35 +0000 (08:26 -0400)] 
Fix a bug in the copy stack code (Issue #768)

2 years agoscheduler/job.c: Fix extensive logging in scheduler
zdohnal [Thu, 27 Jul 2023 16:48:19 +0000 (18:48 +0200)] 
scheduler/job.c: Fix extensive logging in scheduler

Based on currently unknown trigger scheduler sometimes sets JobHistoryUpdate into past, which causes select() to timeout after one second.

It happens when job->file_time of a job without files to remove gets assigned to JobHistoryUpdate. If we check for job->num_files and assign the job->file_time only if there are any, we will fix extensive logging (and unneeded cupsd execution) in various places, e.g. cleaning jobs, expiring subscriptions, deleting temporary queues...

Fixes #604

2 years agoscheduler/job.c: Fix extensive logging in scheduler 767/head
Zdenek Dohnal [Thu, 27 Jul 2023 10:34:52 +0000 (12:34 +0200)] 
scheduler/job.c: Fix extensive logging in scheduler

Based on currently unknown trigger scheduler sometimes sets
JobHistoryUpdate into past, which causes `select()` to timeout after one
second.

It happens when `job->file_time` of a job without files to remove gets
assigned to `JobHistoryUpdate`. If we check for `job->num_files` and
assign the `job->file_time` only if there are any, we will fix extensive
logging (and unneeded cupsd execution) in various places, e.g. cleaning
jobs, expiring subscriptions, deleting temporary queues...

Fixes #604

2 years agoEnable manual builds.
Michael R Sweet [Tue, 25 Jul 2023 19:17:31 +0000 (15:17 -0400)] 
Enable manual builds.

2 years agoUpdate LibreSSL version used by VC projects.
Michael R Sweet [Tue, 25 Jul 2023 18:58:44 +0000 (14:58 -0400)] 
Update LibreSSL version used by VC projects.

2 years agoUpdate REPORTING_ISSUES.md
zdohnal [Fri, 14 Jul 2023 05:50:54 +0000 (07:50 +0200)] 
Update REPORTING_ISSUES.md

Use `lpstat -l -e` in the document - its output gives easier distinction between temporary and permanent queues.

Thank you Brian Potkin for suggestion!

2 years agoMerge pull request #745 from zdohnal/ippeveprint_man
zdohnal [Thu, 13 Jul 2023 15:28:30 +0000 (17:28 +0200)] 
Merge pull request #745 from zdohnal/ippeveprint_man

Update ippeveprinter documentation

2 years agoApply feedback 745/head
Zdenek Dohnal [Thu, 13 Jul 2023 13:29:25 +0000 (15:29 +0200)] 
Apply feedback

2 years agoUpdate help pages via mantohtml
Zdenek Dohnal [Wed, 28 Jun 2023 12:27:17 +0000 (14:27 +0200)] 
Update help pages via mantohtml

2 years agomantohtml.c: Fix leftovers of strtod()->atof() migration
Zdenek Dohnal [Wed, 28 Jun 2023 12:25:51 +0000 (14:25 +0200)] 
mantohtml.c: Fix leftovers of strtod()->atof() migration

2 years agoman: Fix ippeveprinter man page
Zdenek Dohnal [Wed, 28 Jun 2023 12:22:36 +0000 (14:22 +0200)] 
man: Fix ippeveprinter man page

- explain further parameter `-F` (fixes #744)
- add missing explanation of parameters `-K` and `-a`

2 years agoUpdate pt-BR translation (#613)
Guilherme Gonzaga [Wed, 12 Jul 2023 12:06:25 +0000 (08:06 -0400)] 
Update pt-BR translation (#613)

Translations provided by Guilherme Gonzaga, thanks a lot!

2 years agoUse ASN1_TIME_to_tm when converting X.509 date/time values.
Michael R Sweet [Tue, 11 Jul 2023 20:08:21 +0000 (16:08 -0400)] 
Use ASN1_TIME_to_tm when converting X.509 date/time values.

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Tue, 27 Jun 2023 11:29:50 +0000 (13:29 +0200)] 
Update CHANGES.md

2 years agoUse "purge-job" instead of "purge-jobs" when canceling a single job (#742)
Bryan Mason [Tue, 27 Jun 2023 11:18:46 +0000 (04:18 -0700)] 
Use "purge-job" instead of "purge-jobs" when canceling a single job (#742)

The command "cancel -x <job>" adds "purge-jobs true" to the Cancel-Job
operation; however, the correct attribute to use for Cancel-job is
"purge-job" (singular), not "purge-jobs" (plural).  As a result, job
files are not removed from /var/spool/cups when "cancel -x <job>" is
executed.

This patch resolves the issue by adding "purge-job" when the IPP
operation is Cancel-Job and "purge-jobs" for other IPP operations
(Purge-Jobs, Cancel-Jobs, and Cancel-My-Jobs)

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Tue, 27 Jun 2023 06:21:43 +0000 (08:21 +0200)] 
Update CHANGES.md

2 years agoFix delays in printing to lpd when reserved ports are exhausted (Issue #741)
zdohnal [Mon, 26 Jun 2023 14:24:33 +0000 (16:24 +0200)] 
Fix delays in printing to lpd when reserved ports are exhausted (Issue #741)

We use our internal implementation for BSD resvport() by default in LPD backend, which should act on port ranges 512 - 1023, however we didn't go back to the highest port number once we got under the lowest port number. This caused a delay 511s long until  `lpd_queue()` got the port number to 0, which triggered the assignment of the highest port number.

The highest port number is assigned right after we cross the lowest port number, which eliminates this kind of delay.

PR by Bryan Mason from Red Hat

2 years agoFix delays printing to lpd when reserved ports are exhausted 741/head
Bryan Mason [Sat, 24 Jun 2023 19:31:23 +0000 (12:31 -0700)] 
Fix delays printing to lpd when reserved ports are exhausted

cups_rresvport() doesn't reserve ports less than 512; however,
lpd_queue() continues decrementing the port number to 0.  This leads
to delays of ~511 seconds once all ports between 512-1023 are
exhausted.  Even when ports become available, lpd_queue() still tries
calling cups_rresvport() with port numbers less than 512, waiting one
second between each call.

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 22 Jun 2023 10:15:20 +0000 (12:15 +0200)] 
Update CHANGES.md

2 years agoMerge pull request from GHSA-qjgh-5hcq-5f25
zdohnal [Thu, 22 Jun 2023 10:00:56 +0000 (12:00 +0200)] 
Merge pull request from GHSA-qjgh-5hcq-5f25

Log result of httpGetHostname BEFORE closing the connection

2 years agoMerge pull request #729 from zdohnal/cupssinglefile
zdohnal [Thu, 15 Jun 2023 07:04:42 +0000 (09:04 +0200)] 
Merge pull request #729 from zdohnal/cupssinglefile

cups/ppd-cache.c: Put cupsSingleFile into generated PPD

2 years agocups/ppd-cache.c: Put cupsSingleFile into generated PPD 729/head
Zdenek Dohnal [Wed, 14 Jun 2023 07:55:33 +0000 (09:55 +0200)] 
cups/ppd-cache.c: Put cupsSingleFile into generated PPD

Some printers are not able to print multiple files in one job via IPP
Everywhere. Adding the PPD keyword enables the feature on all printers
in exchange for performance degradation (there is a 1-2s pause between
printed files).

Fixes #643

2 years agoMerge pull request #726 from AtariDreams/Fix-regression
Till Kamppeter [Sun, 11 Jun 2023 21:31:27 +0000 (23:31 +0200)] 
Merge pull request #726 from AtariDreams/Fix-regression

Regression: Certificate data is corrupted during base64 conversion

2 years agoRegression: Certificate data is corrupted during base64 conversion 726/head
Rose [Sun, 11 Jun 2023 20:09:53 +0000 (16:09 -0400)] 
Regression: Certificate data is corrupted during base64 conversion

The bug during which certificates become corrupt was introduced in a521b235a1abc008cb0b2f490a765bb31e2ec14b. It turns out some data was not being truncated after being promoted to an integer, causing 1s to be ORed into the index number when they should not have been.

I only intended to remove the & 255 from the other side, where the & 63 would have rendered that operation redundant.

I apologize for this error. I made the appropriate changes I intended to make in this new PR.

Please merge and make a new release if possible.

Thank you so much!

2 years agoLog result of httpGetHostname BEFORE closing the connection
Rose [Thu, 1 Jun 2023 15:33:39 +0000 (11:33 -0400)] 
Log result of httpGetHostname BEFORE closing the connection

httpClose frees the memory of con->http. This is problematic because httpGetHostname then tries to access the memory it points to.

We have to log the hostname first.

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Tue, 6 Jun 2023 11:21:00 +0000 (13:21 +0200)] 
Update CHANGES.md

2 years agoMerge pull request #721 from zdohnal/cupsgetnameddest_crash
zdohnal [Tue, 6 Jun 2023 11:15:17 +0000 (13:15 +0200)] 
Merge pull request #721 from zdohnal/cupsgetnameddest_crash

dest.c: Call cupsEnumDests() only if data.name is not NULL (fixes #719)

2 years agoFix indentation 721/head
Zdenek Dohnal [Tue, 6 Jun 2023 08:52:35 +0000 (10:52 +0200)] 
Fix indentation

2 years agodest.c: Call cupsEnumDests() only if data.name is not NULL (fixes #719)
Zdenek Dohnal [Tue, 6 Jun 2023 08:45:37 +0000 (10:45 +0200)] 
dest.c: Call cupsEnumDests() only if data.name is not NULL (fixes #719)

Fixes regression created by #452 - in case there is no default
destination and `cupsGetNamedDest()` is called to get one (by calling it
with argument `name` as NULL), the function crashes.

It happens because we try to look for the default printer on the network
(where we access `data.name`, which is NULL, in callback), but we never
found out the printer's name.

Original fix by Emilio Cobos Alvarez.

2 years agoPrep CUPS 2.5 development.
Michael R Sweet [Fri, 2 Jun 2023 14:10:02 +0000 (10:10 -0400)] 
Prep CUPS 2.5 development.

2 years agoMerge pull request #716 from 10ne1/master
Michael R Sweet [Fri, 2 Jun 2023 13:59:32 +0000 (09:59 -0400)] 
Merge pull request #716 from 10ne1/master

config-scripts/cups-common.m4: fix error message typo

2 years agoconfig-scripts/cups-common.m4: fix error message typo 716/head
Adrian Ratiu [Wed, 29 Mar 2023 19:19:31 +0000 (22:19 +0300)] 
config-scripts/cups-common.m4: fix error message typo

$COMPONENT should be $COMPONENTS to properly print
the bad build component, otherwise it's empty.

2 years agoUpdate CHANGES.md for next release
Zdenek Dohnal [Thu, 1 Jun 2023 15:55:29 +0000 (17:55 +0200)] 
Update CHANGES.md for next release

2 years agoRemove 2.4.4 from CHANGES.md for now v2.4.3
Zdenek Dohnal [Thu, 1 Jun 2023 15:08:01 +0000 (17:08 +0200)] 
Remove 2.4.4 from CHANGES.md for now

2 years ago2.4.3
Zdenek Dohnal [Thu, 1 Jun 2023 15:05:54 +0000 (17:05 +0200)] 
2.4.3

2 years agoMerge pull request #711 from zdohnal/Plombo-printer-conf-strings
Michael R Sweet [Thu, 1 Jun 2023 14:08:55 +0000 (10:08 -0400)] 
Merge pull request #711 from zdohnal/Plombo-printer-conf-strings

Save strings file path in printers.conf by Bryan Cain + feedback applied

2 years agoprinters.c: Set .strings file path if PPD cache is valid (fixes #710) 711/head
Zdenek Dohnal [Thu, 1 Jun 2023 13:57:36 +0000 (15:57 +0200)] 
printers.c: Set .strings file path if PPD cache is valid (fixes #710)

2 years agoUpdate configure script.
Michael R Sweet [Thu, 1 Jun 2023 13:42:22 +0000 (09:42 -0400)] 
Update configure script.

2 years agoMerge pull request #704 from l1gi/master
Michael R Sweet [Thu, 1 Jun 2023 13:41:53 +0000 (09:41 -0400)] 
Merge pull request #704 from l1gi/master

host_os_name value in config-scripts has changed to 'solaris'

2 years agoCI: Fix i386 for now
Zdenek Dohnal [Thu, 1 Jun 2023 12:47:49 +0000 (14:47 +0200)] 
CI: Fix i386 for now

Although Ubuntu is dropping support for i386, this PR fixes build i386
for now. However we have to remove image upgrade, so probably once there
is a new image, i386 will be broken again.

I would remove the job for i386 once it breaks again due removing
support for i386 in Ubuntu.

2 years agohost_os_name value in config-scripts has changed to 'solaris' 704/head
Martin Rehak [Thu, 1 Jun 2023 12:10:23 +0000 (14:10 +0200)] 
host_os_name value in config-scripts has changed to 'solaris'

2 years agohost_os_name value in config-scripts has changed to 'solaris'
Martin Rehak [Fri, 26 May 2023 07:53:07 +0000 (09:53 +0200)] 
host_os_name value in config-scripts has changed to 'solaris'

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 1 Jun 2023 10:11:38 +0000 (12:11 +0200)] 
Update CHANGES.md

2 years agocups/string.c: Return if `size` is 0 (fixes CVE-2023-32324)
Zdenek Dohnal [Thu, 1 Jun 2023 10:04:00 +0000 (12:04 +0200)] 
cups/string.c: Return if `size` is 0 (fixes CVE-2023-32324)

2 years agoSECURITY.md: Use GitHub private advisories for reporting (fixes #703)
Zdenek Dohnal [Thu, 1 Jun 2023 08:45:25 +0000 (10:45 +0200)] 
SECURITY.md: Use GitHub private advisories for reporting (fixes #703)

2 years agoCHANGES.md: Add pull requests which fix noticeable bugs
Zdenek Dohnal [Wed, 31 May 2023 12:51:02 +0000 (14:51 +0200)] 
CHANGES.md: Add pull requests which fix noticeable bugs

2 years agoMerge pull request #705 from zdohnal/fix_github_actions
Michael R Sweet [Tue, 30 May 2023 15:35:11 +0000 (11:35 -0400)] 
Merge pull request #705 from zdohnal/fix_github_actions

workflows.yaml: Fix Github Actions and various fixes

2 years agoworkflows.yaml: Fix Github Actions on i386 705/head
Zdenek Dohnal [Tue, 30 May 2023 12:57:46 +0000 (14:57 +0200)] 
workflows.yaml: Fix Github Actions on i386

- build i386 was failing due missing dependencies - libgcc-s1:i386 and
  libstdc++6:i386
- use ubuntu-latest, so we automatically use the latest stable, but
  print out the pretty name in workflow to show which version it is
  (dont wanna to look up the names :))
- update the image before testing

2 years agoMerge pull request #709 from nmuggli/media-col-database-custom-size
Michael R Sweet [Sun, 28 May 2023 15:15:19 +0000 (11:15 -0400)] 
Merge pull request #709 from nmuggli/media-col-database-custom-size

Add custom page size values to media-col-database

2 years agoAdd custom page size values to media-col-database 709/head
Nathan Muggli [Fri, 26 May 2023 18:36:45 +0000 (12:36 -0600)] 
Add custom page size values to media-col-database

When creating the IPP attrs based on the PPD file, if the PPD file
supports custom page sizes update our media-col-database to contain a
media-size attr with the min/max range.

2 years agoMerge branch 'master' of https://github.com/l1gi/cups
Martin Rehak [Fri, 26 May 2023 07:53:07 +0000 (09:53 +0200)] 
Merge branch 'master' of https://github.com/l1gi/cups

2 years agohost_os_name value in config-scripts has changed to 'solaris' some time ago
Martin Rehak [Thu, 18 May 2023 13:48:43 +0000 (15:48 +0200)] 
host_os_name value in config-scripts has changed to 'solaris' some time ago

2 years agoMerge pull request #461 from zdohnal/color_override_correction
zdohnal [Thu, 25 May 2023 14:52:53 +0000 (16:52 +0200)] 
Merge pull request #461 from zdohnal/color_override_correction

backend/ipp.c: Adjust job options with similar meaning to the same values

2 years agobackend/ipp.c: Adjust color job options 461/head
Zdenek Dohnal [Mon, 22 May 2023 15:52:43 +0000 (17:52 +0200)] 
backend/ipp.c: Adjust color job options

In case the client doesn't do it, we have to consolidate color options
in the job to prevent opposite options being set at the same time.

2 years agoMerge pull request #688 from Plombo/media-type-no-duplicate-names
Michael R Sweet [Wed, 24 May 2023 18:21:50 +0000 (14:21 -0400)] 
Merge pull request #688 from Plombo/media-type-no-duplicate-names

Fix duplicate PPD->IPP media-type name mappings

2 years agoFix duplicate PPD->IPP media-type name mappings 688/head
Bryan Cain [Fri, 12 May 2023 17:23:24 +0000 (11:23 -0600)] 
Fix duplicate PPD->IPP media-type name mappings

If more than one MediaType in a PPD matched the pattern for a registered
PWG media-type name, they would all be mapped to that name, making it
impossible for a client using CUPS' IPP interface to distinguish between
them or specify a particular one.

This comes up with Epson-provided PPDs, which frequently hit this case
by combining print quality with media type like so:
*MediaType PLAIN_HIGH/Plain paper-High: "
*MediaType PLAIN_NORMAL/Plain paper-Standard: "

Solve this problem by not assigning the standard PWG name to either one
when such duplication occurs.

2 years agoMerge pull request #706 from meshantz/delay-defaults-docs
Michael R Sweet [Fri, 19 May 2023 14:58:43 +0000 (10:58 -0400)] 
Merge pull request #706 from meshantz/delay-defaults-docs

Document default repeat interval

2 years agoDocument default repeat interval 706/head
Mike Shantz [Fri, 19 May 2023 14:41:48 +0000 (10:41 -0400)] 
Document default repeat interval

2 years agoPotential fix for Kyocera driver bug (Issue #619)
Michael R Sweet [Thu, 18 May 2023 20:47:17 +0000 (16:47 -0400)] 
Potential fix for Kyocera driver bug (Issue #619)

2 years agohost_os_name value in config-scripts has changed to 'solaris' some time ago
Martin Rehak [Thu, 18 May 2023 13:48:43 +0000 (15:48 +0200)] 
host_os_name value in config-scripts has changed to 'solaris' some time ago

2 years agoMerge pull request #692 from AtariDreams/inverse-check
Michael R Sweet [Sat, 13 May 2023 21:38:26 +0000 (17:38 -0400)] 
Merge pull request #692 from AtariDreams/inverse-check

Check that the number of trays is consistent before fetching anymore data

2 years agoMerge pull request #695 from ggodlewski/master
Michael R Sweet [Sat, 13 May 2023 21:36:43 +0000 (17:36 -0400)] 
Merge pull request #695 from ggodlewski/master

Fix ipptool JSON output

2 years agoCheck that the number of trays is consistent before fetching anymore data 692/head
Rose [Sat, 13 May 2023 19:14:34 +0000 (15:14 -0400)] 
Check that the number of trays is consistent before fetching anymore data

There is no point in getting this data otherwise if the number of sources defined for the media_sources and for the input_tray differ.

2 years agoFix ipptool JSON output 695/head
Grzegorz Godlewski [Sat, 13 May 2023 21:04:21 +0000 (23:04 +0200)] 
Fix ipptool JSON output

2 years agoMerge pull request #591 from AtariDreams/XOR-3
Michael R Sweet [Sat, 13 May 2023 20:38:28 +0000 (16:38 -0400)] 
Merge pull request #591 from AtariDreams/XOR-3

Use XOR for integers that are always 1 or 0

2 years agoUse XOR for integers that are always 1 or 0 591/head
Rose [Fri, 20 Jan 2023 18:23:45 +0000 (13:23 -0500)] 
Use XOR for integers that are always 1 or 0

This is more efficient than using the ! operator on older platforms.

2 years agoMerge pull request #655 from AtariDreams/What-We-Learned
Michael R Sweet [Fri, 12 May 2023 18:11:37 +0000 (14:11 -0400)] 
Merge pull request #655 from AtariDreams/What-We-Learned

Free memory leaked by Darwin's Core Foundation

2 years agoFree memory leaked by Darwin's Core Foundation 655/head
Rose [Wed, 19 Apr 2023 17:07:38 +0000 (13:07 -0400)] 
Free memory leaked by Darwin's Core Foundation

There are cases where we do not always free the CF objects we allocate, causing them to leak.

2 years agoMerge pull request #686 from AtariDreams/print_ptr
Michael R Sweet [Fri, 12 May 2023 15:44:25 +0000 (11:44 -0400)] 
Merge pull request #686 from AtariDreams/print_ptr

Use print_ptr instead of print_buffer

2 years agoMerge pull request #684 from AtariDreams/wordlen
Michael R Sweet [Fri, 12 May 2023 15:42:38 +0000 (11:42 -0400)] 
Merge pull request #684 from AtariDreams/wordlen

Wordlen should be a size_t, not an int

2 years agoWordlen should be a size_t, not an int 684/head
Rose [Thu, 11 May 2023 17:47:09 +0000 (13:47 -0400)] 
Wordlen should be a size_t, not an int

text is always more than or equal to ptr, so it will never underflow.

2 years agoUse print_ptr instead of print_buffer 686/head
Rose [Thu, 11 May 2023 20:19:32 +0000 (16:19 -0400)] 
Use print_ptr instead of print_buffer

It was forgotten about, making the whole bytes addition useless.

2 years agoMerge pull request #687 from davebarkerxyz/fix-persist-color-mode
Michael R Sweet [Fri, 12 May 2023 15:33:36 +0000 (11:33 -0400)] 
Merge pull request #687 from davebarkerxyz/fix-persist-color-mode

Fix check for existing color mode setting

2 years agoFix check for existing color mode setting 687/head
Dave Barker [Fri, 12 May 2023 09:39:52 +0000 (10:39 +0100)] 
Fix check for existing color mode setting

Colour mode selection is not persisted correctly across restarts. Current check is for "printer-color-mode", but every other reference to this option is "print-color-mode" (no "er"). This was causing the selected colour mode to be reset to the PPD default on restart.

2 years agoUpdate copyright.
Michael R Sweet [Wed, 10 May 2023 19:43:12 +0000 (15:43 -0400)] 
Update copyright.

2 years agoRemove unused variable.
Michael R Sweet [Wed, 10 May 2023 19:41:14 +0000 (15:41 -0400)] 
Remove unused variable.

2 years agoFix an integer overflow issue in the PWG media size name code (Issue #668)
Michael R Sweet [Wed, 10 May 2023 19:33:23 +0000 (15:33 -0400)] 
Fix an integer overflow issue in the PWG media size name code (Issue #668)

2 years agoMerge pull request #656 from AtariDreams/u
Michael R Sweet [Wed, 10 May 2023 18:43:52 +0000 (14:43 -0400)] 
Merge pull request #656 from AtariDreams/u

Use %u for unsigned, not signed

2 years agoUse %u for unsigned, not signed 656/head
Rose [Wed, 19 Apr 2023 18:12:13 +0000 (14:12 -0400)] 
Use %u for unsigned, not signed

2 years agoMerge pull request #590 from AtariDreams/memory
Michael R Sweet [Sat, 6 May 2023 13:18:13 +0000 (09:18 -0400)] 
Merge pull request #590 from AtariDreams/memory

Improve state handling in cases of memory allocation failure

2 years agoImprove state handling in cases of memory allocation failure 590/head
Rose [Fri, 20 Jan 2023 17:47:21 +0000 (12:47 -0500)] 
Improve state handling in cases of memory allocation failure

Many lines of code assume that malloc will not fail. In cases where it does, sometimes the program does not know, and as a result, memory can leak and more disastrous consequences can happen before the program ultimately finds something is wrong and then calls exit();

2 years agoMerge pull request #642 from zdohnal/raise_fortify
Michael R Sweet [Mon, 1 May 2023 23:18:14 +0000 (19:18 -0400)] 
Merge pull request #642 from zdohnal/raise_fortify

configure: Raise FORTIFY_SOURCE level to 3

2 years agoDrop Codacy code scanning.
Michael R Sweet [Mon, 1 May 2023 22:46:03 +0000 (18:46 -0400)] 
Drop Codacy code scanning.

2 years agoMerge pull request #659 from AtariDreams/strncmp
Michael R Sweet [Mon, 1 May 2023 18:20:45 +0000 (14:20 -0400)] 
Merge pull request #659 from AtariDreams/strncmp

Cast to unsigned long instead of long for size_t

2 years agoCast to unsigned long instead of long for size_t 659/head
Rose [Thu, 20 Apr 2023 17:31:34 +0000 (13:31 -0400)] 
Cast to unsigned long instead of long for size_t

size_t is unsigned, so let's not worry about signedness.

2 years agoMerge pull request #669 from AtariDreams/fields
Michael R Sweet [Mon, 1 May 2023 11:54:55 +0000 (07:54 -0400)] 
Merge pull request #669 from AtariDreams/fields

UBSan: Array over-read when operating on _fields

2 years agoconfigure: Use _FORTIFY_SOURCE if not defined already 642/head
Zdenek Dohnal [Fri, 28 Apr 2023 08:00:27 +0000 (10:00 +0200)] 
configure: Use _FORTIFY_SOURCE if not defined already

If _FORTIFY_SOURCE is not defined in flags, use its level 3.

Backported from libcups.

2 years agoUBSan: Array over-read when operating on _fields 669/head
Rose [Sun, 23 Apr 2023 17:09:50 +0000 (13:09 -0400)] 
UBSan: Array over-read when operating on _fields

We are reading outside of the _fields boundaries and onto other fields when we iterate across all the fields, rather than comparing just those that are within _fields, and then always freeing the ones that are not.

This PR fixes that.

2 years agoMerge pull request #670 from AtariDreams/pos-fp
Michael R Sweet [Tue, 25 Apr 2023 20:49:14 +0000 (16:49 -0400)] 
Merge pull request #670 from AtariDreams/pos-fp

UBSan: Contain pos - fp->bufpos in parentheses

2 years agoUBSan: Contain pos - fp->bufpos in parentheses 670/head
Rose [Sun, 23 Apr 2023 16:25:39 +0000 (12:25 -0400)] 
UBSan: Contain pos - fp->bufpos in parentheses

Yes I know this shouldn't change the behavior in theory, but clang insists it does in practice, so to quiet the UBSan, I put parentheses around pos - fp->bufpos.

2 years agoFix coverity-detected typo.
Michael R Sweet [Tue, 25 Apr 2023 11:34:20 +0000 (07:34 -0400)] 
Fix coverity-detected typo.

2 years agoFix build errors.
Michael R Sweet [Sun, 23 Apr 2023 21:44:33 +0000 (17:44 -0400)] 
Fix build errors.

2 years agoFix a few Coverity-reported issues.
Michael R Sweet [Sat, 22 Apr 2023 03:46:06 +0000 (23:46 -0400)] 
Fix a few Coverity-reported issues.

2 years agofilter/pstops.c: Fix incorrect comparison size for %%PageResources
Zdenek Dohnal [Thu, 20 Apr 2023 07:39:42 +0000 (09:39 +0200)] 
filter/pstops.c: Fix incorrect comparison size for %%PageResources

Fixes #658

2 years agoClean up OpenSSL fixes and changelog (Issue #652)
Michael R Sweet [Thu, 13 Apr 2023 15:22:51 +0000 (11:22 -0400)] 
Clean up OpenSSL fixes and changelog (Issue #652)

2 years agocups/tls-openssl.c: Use general names in certificates (fixes #652)
Zdenek Dohnal [Thu, 13 Apr 2023 08:31:58 +0000 (10:31 +0200)] 
cups/tls-openssl.c: Use general names in certificates (fixes #652)

This results into having only one Subject Alternative Name extension,
which fixes SEC_ERROR_EXTENSION_VALUE_INVALID in Firefox.

2 years agoREPORTING_ISSUES.md: Make the file more readable
Zdenek Dohnal [Mon, 27 Mar 2023 14:50:34 +0000 (16:50 +0200)] 
REPORTING_ISSUES.md: Make the file more readable

2 years agoMerge pull request #617 from AtariDreams/cupsMakeServerCredentials
Michael R Sweet [Sat, 4 Mar 2023 18:43:36 +0000 (13:43 -0500)] 
Merge pull request #617 from AtariDreams/cupsMakeServerCredentials

cupsMakeServerCredentials should return 0 on failure, 1 on success