cups/cups-rastertopwg-crash.patch
Zdenek Dohnal 701bef73e8 2.3.3
2020-05-19 10:42:33 +02:00

15 lines
576 B
Diff

diff --git a/filter/rastertopwg.c b/filter/rastertopwg.c
index 1e63e4e..b3a2e87 100644
--- a/filter/rastertopwg.c
+++ b/filter/rastertopwg.c
@@ -260,7 +260,8 @@ main(int argc, /* I - Number of command-line args */
}
if (inheader.cupsPageSizeName[0] &&
- (pwg_size = _ppdCacheGetSize(cache, inheader.cupsPageSizeName)) != NULL)
+ (pwg_size = _ppdCacheGetSize(cache, inheader.cupsPageSizeName)) != NULL &&
+ pwg_size->map.pwg)
{
strlcpy(outheader.cupsPageSizeName, pwg_size->map.pwg,
sizeof(outheader.cupsPageSizeName));