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:
parent
afcf651cf8
commit
8d8219c5b9
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user