mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 19:22:47 +00:00
Check that the hostname field in received packets is NUL-terminated.
This commit is contained in:
parent
afd27fce94
commit
cfc038e79c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70561
@ -230,6 +230,13 @@ again:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (memchr(msgin.tsp_name,
|
||||
'\0', sizeof msgin.tsp_name) == NULL) {
|
||||
syslog(LOG_NOTICE, "hostname field not NUL terminated "
|
||||
"in packet from %s", inet_ntoa(from.sin_addr));
|
||||
continue;
|
||||
}
|
||||
|
||||
fromnet = NULL;
|
||||
for (ntp = nettab; ntp != NULL; ntp = ntp->next)
|
||||
if ((ntp->mask & from.sin_addr.s_addr) ==
|
||||
|
Loading…
Reference in New Issue
Block a user