diff options
| author | Ben Smithurst <ben@FreeBSD.org> | 2001-01-01 18:43:21 +0000 |
|---|---|---|
| committer | Ben Smithurst <ben@FreeBSD.org> | 2001-01-01 18:43:21 +0000 |
| commit | cfc038e79cb54a402e6ceec5a96aa82bb6315ed6 (patch) | |
| tree | 8c0f0680d1d1b4b8427434605c54e0da8126b4c7 /usr.sbin/timed | |
| parent | afd27fce948257d16b37d4f0949b45b83e5616ab (diff) | |
Notes
Diffstat (limited to 'usr.sbin/timed')
| -rw-r--r-- | usr.sbin/timed/timed/readmsg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/timed/timed/readmsg.c b/usr.sbin/timed/timed/readmsg.c index 663839069848b..cca415e4f10f9 100644 --- a/usr.sbin/timed/timed/readmsg.c +++ b/usr.sbin/timed/timed/readmsg.c @@ -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) == |
