]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix rastertopwg crash (Apple issue #5773)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 28 Oct 2020 16:43:42 +0000 (12:43 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 28 Oct 2020 16:43:42 +0000 (12:43 -0400)
CHANGES-OPENPRINTING.md
filter/rastertopwg.c

index ae46096d49f26f6f6ba1cd4d63adcb7a93a4c9ad..d9782704c4ff4e1f1d3d1ce4a2fe5cd646a444a8 100644 (file)
@@ -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)
index 1e63e4ec04f7058537003f6dbd86874821e26ea0..0fa127e29d8b9621f7e7922773ecb2fd0eb7ed04 100644 (file)
@@ -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));