From 8d8219c5b92f1c73d552d5ee238ba396a4e9b7bb Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 25 Jul 2002 15:45:41 +0000 Subject: [PATCH] When parsing the program name from the incoming log message from a client, accept all printable characters as being part of the program name, except ':' and '[', because each is a possible delimiter. --- usr.sbin/syslogd/syslogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 2b9b4c92d11b..2405748a5ace 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -804,7 +804,7 @@ logmsg(int pri, const char *msg, const char *from, int flags) /* extract program name */ for (i = 0; i < NAME_MAX; i++) { - if (!isalnum(msg[i])) + if (!isprint(msg[i]) || msg[i] == ':' || msg[i] == '[') break; prog[i] = msg[i]; }