summaryrefslogtreecommitdiff
path: root/systemv
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-02-21 11:13:20 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-02-21 11:13:20 -0500
commitbb525305608a74394b60dc58fbd80233c1316a1e (patch)
tree5d14f0e0b997b720ee0d9dc897b3cf61af62934f /systemv
parent47b3bd03e4bbacf355ccdadce4b0331e6944f140 (diff)
downloadcups-bb525305608a74394b60dc58fbd80233c1316a1e.tar.gz
The lpadmin command would hang with a bad PPD file (rdar://41495016)
Diffstat (limited to 'systemv')
-rw-r--r--systemv/lpadmin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 53580ff4e..f428368d4 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);