doc/share/security/patches/SA-01:31/ntpd-3.x.patch
Bjoern A. Zeeb 3571e53040 Import FreeBSD Security Advisories and Errata Notices, as well as their
patches for easier mirroring, to eliminate a special copy, to make
www.freebsd.org/security a full copy of security.freebsd.org and be
eventually be the same.

For now files are just sitting there.   The symlinks are missing.

Discussed on:	www (repository location)
Discussed with:	simon (so)
2012-08-15 06:19:40 +00:00

47 lines
1.4 KiB
Diff

Index: usr.sbin/xntpd/xntpd/ntp_control.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/xntpd/xntpd/Attic/ntp_control.c,v
retrieving revision 1.6
diff -u -r1.6 ntp_control.c
--- usr.sbin/xntpd/xntpd/ntp_control.c 1995/05/30 03:54:35 1.6
+++ usr.sbin/xntpd/xntpd/ntp_control.c 2001/04/06 19:36:45
@@ -1684,7 +1684,7 @@
/*
* Delete leading commas and white space
*/
- while (reqpt < reqend && (*reqpt == ',' || isspace(*reqpt))) {
+ while (reqpt < reqend && (*reqpt == ',' || isspace((unsigned char)*reqpt))) {
reqpt++;
}
@@ -1708,7 +1708,7 @@
tp++;
}
if ((*tp == '\0') || (*tp == '=')) {
- while (cp < reqend && isspace(*cp))
+ while (cp < reqend && isspace((unsigned char)*cp))
cp++;
if (cp == reqend || *cp == ',') {
buf[0] = '\0';
@@ -1721,14 +1721,18 @@
if (*cp == '=') {
cp++;
tp = buf;
- while (cp < reqend && isspace(*cp))
+ while (cp < reqend && isspace((unsigned char)*cp))
cp++;
- while (cp < reqend && *cp != ',')
+ while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
+ if (tp >= buf + sizeof(buf))
+ return (0);
+ }
if (cp < reqend)
cp++;
*tp = '\0';
- while (isspace(*(tp-1)))
+ while (tp != buf &&
+ isspace((unsigned char)*(tp-1)))
*(--tp) = '\0';
reqpt = cp;
*data = buf;