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]; }