Skip to content

Commit

Permalink
Fix an issue with the IPP backend and unsupported "sides" values (rda…
Browse files Browse the repository at this point in the history
…r:https://51775322)
  • Loading branch information
michaelrsweet committed Jun 17, 2019
1 parent 90d3999 commit f93b470
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.git* export-ignore
.mailmap export-ignore
examples/testfile.pcl -text
exampels/testfile.txt -text
scripts export-ignore
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Changes in CUPS v2.3.0
- Removed dead code from the scheduler (Issue #5593)
- "make" failed with GZIP options (Issue #5595)
- Fixed a NULL pointer dereference bug in `httpGetSubField2` (Issue #5598)
- Fixed an issue with unsupported "sides" values in the IPP backend
(rdar:https://51775322)
- Fixed an issue with `EXPECT !name WITH-VALUE ...` tests.
- Fixed a command ordering issue in the Zebra ZPL driver.

Expand Down
2 changes: 1 addition & 1 deletion backend/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ main(int argc, /* I - Number of command-line args */

const char *sides = cupsGetOption("sides", num_options, options);

if (!strncmp(sides, "two-sided-", 10))
if (!sides || !strncmp(sides, "two-sided-", 10))
{
fputs("DEBUG: Unable to do two-sided printing, setting sides to 'one-sided'.\n", stderr);
num_options = cupsAddOption("sides", "one-sided", num_options, &options);
Expand Down

0 comments on commit f93b470

Please sign in to comment.