From 5d38d4d6e9e1e758395546e38af8e8c738043fd1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 6 Apr 2008 13:21:42 +0000 Subject: p could be null here. --- src/rc/rc-applets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rc/rc-applets.c') diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index 70f3a044..d434be44 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -110,7 +110,7 @@ static int do_e(int argc, char **argv) } else if (strcmp(applet, "esyslog") == 0 || strcmp(applet, "elog") == 0) { p = strchr(argv[0], '.'); - if ((level = syslog_decode(p + 1, prioritynames)) == -1) + if (!p || (level = syslog_decode(p + 1, prioritynames)) == -1) eerrorx("%s: invalid log level `%s'", applet, argv[0]); if (argc < 3) -- cgit v1.2.3