From 283c48a6a48a8fa917f70582579c816c0ce28ae8 Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 7 Oct 2011 21:05:19 +0000 Subject: [PATCH] The lpstat command would crash when then "-u" option was used by a non- administrator (STR #3953) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10062 7a7537e8-13f0-0310-91df-b6672ffda945 --- CHANGES-1.5.txt | 2 ++ systemv/lpstat.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGES-1.5.txt b/CHANGES-1.5.txt index 49b1bb23af..d35a02d086 100644 --- a/CHANGES-1.5.txt +++ b/CHANGES-1.5.txt @@ -4,6 +4,8 @@ CHANGES-1.5.txt CHANGES IN CUPS V1.5.1 - Documentation updates (STR #3885, STR #3946) + - The lpstat command would crash when then "-u" option was used by a + non-administrator (STR #3953) - Japanese supply level reporting did not always work. - The DBUS notifier could crash (STR #3947) - Relaxed some of the page size checks in cupstestppd. diff --git a/systemv/lpstat.c b/systemv/lpstat.c index 53039660d9..124ce7c00e 100644 --- a/systemv/lpstat.c +++ b/systemv/lpstat.c @@ -580,6 +580,9 @@ match_list(const char *list, /* I - List of names */ if (!list || !*list) return (1); + if (!name) + return (0); + while (*list) { /* -- 2.47.2