svn commit: r191352 - in stable/6/contrib/ntp: . ntpq
Colin Percival
cperciva at FreeBSD.org
Tue Apr 21 10:51:23 UTC 2009
Author: cperciva
Date: Tue Apr 21 10:51:22 2009
New Revision: 191352
URL: http://svn.freebsd.org/changeset/base/191352
Log:
MFH r191302: Fix a buffer overflow.
For reasons of stack alignment, it does not appear that this is exploitable
on any systems FreeBSD runs on, so this will not be getting a security
advisory.
Modified:
stable/6/contrib/ntp/ (props changed)
stable/6/contrib/ntp/ntpq/ntpq.c
Modified: stable/6/contrib/ntp/ntpq/ntpq.c
==============================================================================
--- stable/6/contrib/ntp/ntpq/ntpq.c Tue Apr 21 10:49:40 2009 (r191351)
+++ stable/6/contrib/ntp/ntpq/ntpq.c Tue Apr 21 10:51:22 2009 (r191352)
@@ -3185,9 +3185,9 @@ cookedprint(
if (!decodeuint(value, &uval))
output_raw = '?';
else {
- char b[10];
+ char b[12];
- (void) sprintf(b, "%03lo", uval);
+ (void) snprintf(b, sizeof(b), "%03lo", uval);
output(fp, name, b);
}
break;
More information about the svn-src-stable-6
mailing list