cups/cups-rastertopwg-crash.patch
Petr Šabata 2f721cea89 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/cups#d1b1c28d68dd50f836a2011fe57edd27461bc5e5
2020-10-14 23:24:15 +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));