Module Name: src
Committed By: snj
Date: Sat Apr 18 00:31:08 UTC 2009
Modified Files:
src/dist/ntp/ntpq [netbsd-4]: ntpq.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #1308):
dist/ntp/ntpq/ntpq.c: revision 1.12
Fix:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0159
Using:
https://support.ntp.org/bugs/show_bug.cgi?id=1144
To generate a diff of this commit:
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/dist/ntp/ntpq/ntpq.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/ntp/ntpq/ntpq.c
diff -u src/dist/ntp/ntpq/ntpq.c:1.10.4.1 src/dist/ntp/ntpq/ntpq.c:1.10.4.2
--- src/dist/ntp/ntpq/ntpq.c:1.10.4.1 Tue Aug 21 08:40:22 2007
+++ src/dist/ntp/ntpq/ntpq.c Sat Apr 18 00:31:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ntpq.c,v 1.10.4.1 2007/08/21 08:40:22 ghen Exp $ */
+/* $NetBSD: ntpq.c,v 1.10.4.2 2009/04/18 00:31:08 snj Exp $ */
/*
* ntpq - query an NTP server using mode 6 commands
@@ -3187,9 +3187,10 @@
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;