mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-22 16:44:32 +01:00
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
dcaecffe69
commit
7c33f2d1e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100677
@ -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