From: Michael R Sweet Date: Wed, 28 Oct 2020 16:43:42 +0000 (-0400) Subject: Fix rastertopwg crash (Apple issue #5773) X-Git-Tag: v2.3.3op1~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=580b5d18e092bb3e5718b7d901b8c22a88da041f;p=thirdparty%2Fcups.git Fix rastertopwg crash (Apple issue #5773) --- diff --git a/CHANGES-OPENPRINTING.md b/CHANGES-OPENPRINTING.md index ae46096d49..d9782704c4 100644 --- a/CHANGES-OPENPRINTING.md +++ b/CHANGES-OPENPRINTING.md @@ -32,3 +32,4 @@ Changes in CUPS v2.3.3op1 - Fixed a memory leak in the scheduler (Issue #12) - Fixed a potential integer overflow in the PPD hashing code (Issue #13) - Fixed output-bin and print-quality handling issues (Issue #18) +- Fixed crash in rastertopwg (Apple issue #5773) diff --git a/filter/rastertopwg.c b/filter/rastertopwg.c index 1e63e4ec04..0fa127e29d 100644 --- a/filter/rastertopwg.c +++ b/filter/rastertopwg.c @@ -259,8 +259,7 @@ main(int argc, /* I - Number of command-line args */ } } - if (inheader.cupsPageSizeName[0] && - (pwg_size = _ppdCacheGetSize(cache, inheader.cupsPageSizeName)) != NULL) + if (inheader.cupsPageSizeName[0] && (pwg_size = _ppdCacheGetSize(cache, inheader.cupsPageSizeName)) != NULL && pwg_size->map.pwg) { strlcpy(outheader.cupsPageSizeName, pwg_size->map.pwg, sizeof(outheader.cupsPageSizeName));