Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8c0b673ea1b7e162bcac8e349d03cea > files > 25

ntp-4.2.2p1-15.el5_7.1.src.rpm

diff -up ntp-4.2.2p1/ntpq/ntpq.c.sprintf3 ntp-4.2.2p1/ntpq/ntpq.c
--- ntp-4.2.2p1/ntpq/ntpq.c.sprintf3	2006-06-25 13:02:22.000000000 +0200
+++ ntp-4.2.2p1/ntpq/ntpq.c	2009-05-14 13:43:58.000000000 +0200
@@ -3140,9 +3140,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;