]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The lpadmin command would hang with a bad PPD file (rdar://41495016)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 21 Feb 2019 16:13:20 +0000 (11:13 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 21 Feb 2019 16:13:20 +0000 (11:13 -0500)
CHANGES.md
systemv/lpadmin.c

index 97e062b7f0d2c2a02c32d6a9ca62ca468c56aca0..020e4de4f36598384945b62497d9b9307110f688 100644 (file)
@@ -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
index 53580ff4e36e4bb2e0934ca922cb78f4bdf62023..f428368d4d816d7cba6e229c80e50193de7015e3 100644 (file)
@@ -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);