aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ntpq/ntpq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c
index 91379408ff7c..4835d7e3546f 100644
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -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;