[pkg-ntp-maintainers] Bug#773570: off-by-one
Joshua Rogers
honey at internot.info
Sat Dec 20 01:54:59 UTC 2014
Package: ntp
Version: 4.2.8
Severity: normal
Hi,
In /ntpd/refclock_tsyncpci.c, on line 346 and 354, strncpy does not
account for the NUL byte, leaving the possiblity that the buffer will
not be null-terminated. This could cause problems down the track.
> 346 strncpy((char *)&up->refId, TSYNC_REF_LOCAL, TSYNC_REF_LEN);
> 354 strncpy((char *)&pp->refid, TSYNC_REF_LOCAL, TSYNC_REF_LEN);
Thanks,
--
-- Joshua Rogers <https://internot.info/>
More information about the pkg-ntp-maintainers
mailing list