From: Michael R Sweet Date: Thu, 21 Feb 2019 16:13:20 +0000 (-0500) Subject: The lpadmin command would hang with a bad PPD file (rdar://41495016) X-Git-Tag: v2.3b8~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb525305608a74394b60dc58fbd80233c1316a1e;p=thirdparty%2Fcups.git The lpadmin command would hang with a bad PPD file (rdar://41495016) --- diff --git a/CHANGES.md b/CHANGES.md index 97e062b7f0..020e4de4f3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ CHANGES - 2.3b8 - 2019-02-21 Changes in CUPS v2.3b8 ---------------------- +- The lpadmin command would hang with a bad PPD file (rdar://41495016) - Fixed a potential crash bug in cups-driverd (rdar://46625579) - Fixed a performance regression with large PPDs (rdar://47040759) - The `ippValidateAttribute` function did not catch all instances of invalid diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index 53580ff4e3..f428368d4d 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -1431,6 +1431,7 @@ set_printer_options( /* Status code */ _cupsLangPrintf(stderr, _("lpadmin: Unable to open PPD \"%s\": %s on line %d."), ppdfile, ppdErrorString(status), linenum); + return (1); } ppdMarkDefaults(ppd); @@ -1449,9 +1450,7 @@ set_printer_options( if ((in = cupsFileOpen(ppdfile, "r")) == NULL) { - _cupsLangPrintf(stderr, - _("lpadmin: Unable to open PPD file \"%s\" - %s"), - ppdfile, strerror(errno)); + _cupsLangPrintf(stderr, _("lpadmin: Unable to open PPD \"%s\": %s"), ppdfile, strerror(errno)); ippDelete(request); if (ppdfile != file) unlink(ppdfile);