doc/share/security/patches/SA-01:31/ntpd-4.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

46 lines
1.4 KiB
Diff

Index: contrib/ntp/ntpd/ntp_control.c
===================================================================
RCS file: /home/ncvs/src/contrib/ntp/ntpd/ntp_control.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ntp_control.c
--- contrib/ntp/ntpd/ntp_control.c 2000/01/28 14:53:03 1.1.1.2
+++ contrib/ntp/ntpd/ntp_control.c 2001/04/06 19:34:50
@@ -1610,7 +1610,7 @@
/*
* Delete leading commas and white space
*/
- while (reqpt < reqend && (*reqpt == ',' || isspace((int)*reqpt))) {
+ while (reqpt < reqend && (*reqpt == ',' || isspace((unsigned char)*reqpt))) {
reqpt++;
}
@@ -1634,7 +1634,7 @@
tp++;
}
if ((*tp == '\0') || (*tp == '=')) {
- while (cp < reqend && isspace((int)*cp))
+ while (cp < reqend && isspace((unsigned char)*cp))
cp++;
if (cp == reqend || *cp == ',') {
buf[0] = '\0';
@@ -1647,14 +1647,17 @@
if (*cp == '=') {
cp++;
tp = buf;
- while (cp < reqend && isspace((int)*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((int)(*(tp-1))))
+ while (tp != buf && isspace((unsigned char)(*(tp-1))))
*(--tp) = '\0';
reqpt = cp;
*data = buf;