From f28be53d12e9bf3fd9eda1f8791ca6e40f3aeaeb Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 13 Apr 2019 04:45:22 -0500 Subject: [PATCH 15/18] increase buffer sizes potential truncation --- src/usr.sbin/ntpd/ntpd.c | 2 +- src/usr.sbin/ntpd/util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c index 5817fff78a..bae6abd00f 100644 --- a/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c @@ -909,7 +909,7 @@ show_peer_msg(struct imsg *imsg, int calledfromshowall) { struct ctl_show_peer *cpeer; int cnt; - char stratum[3]; + char stratum[4]; static int firsttime = 1; if (imsg->hdr.type == IMSG_CTL_SHOW_PEERS_END) { diff --git a/src/usr.sbin/ntpd/util.c b/src/usr.sbin/ntpd/util.c index be113ba856..65eb9018bb 100644 --- a/src/usr.sbin/ntpd/util.c +++ b/src/usr.sbin/ntpd/util.c @@ -141,7 +141,7 @@ d_to_sfp(double d) char * print_rtable(int r) { - static char b[11]; + static char b[18]; b[0] = 0; if (r > 0) -- 2.27.0