From f93b470e22ed4c77d92c92f9016c5cc3346e56fb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 17 Jun 2019 15:01:39 -0400 Subject: [PATCH] Fix an issue with the IPP backend and unsupported "sides" values (rdar://51775322) --- .gitattributes | 2 ++ CHANGES.md | 2 ++ backend/ipp.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 1a5c3e6c7b..2f20357d74 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ .git* export-ignore .mailmap export-ignore +examples/testfile.pcl -text +exampels/testfile.txt -text scripts export-ignore diff --git a/CHANGES.md b/CHANGES.md index 06eba39b2a..c1211534b6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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://51775322) - Fixed an issue with `EXPECT !name WITH-VALUE ...` tests. - Fixed a command ordering issue in the Zebra ZPL driver. diff --git a/backend/ipp.c b/backend/ipp.c index 7851956dba..8226acc7b0 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -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); -- 2.47.2