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.
This commit is contained in:
robert 2002-07-25 15:45:41 +00:00
parent afcf651cf8
commit 8d8219c5b9

View File

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