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 Drehmel 2002-07-25 15:45:41 +00:00
parent dcaecffe69
commit 7c33f2d1e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100677

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