From bb525305608a74394b60dc58fbd80233c1316a1e Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 21 Feb 2019 11:13:20 -0500 Subject: The lpadmin command would hang with a bad PPD file (rdar://41495016) --- systemv/lpadmin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'systemv') 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); -- cgit v1.2.1