[ntpsec commit] Fix off-by-one error in cookedprint
Daniel Franke
dfranke at ntpsec.org
Wed Oct 21 18:36:33 UTC 2015
Module: ntpsec
Branch: master
Commit: e5554708321cf367f9b56dadc9a25d96e31dfbbf
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=e5554708321cf367f9b56dadc9a25d96e31dfbbf
Author: Daniel Fox Franke <dfoxfranke at gmail.com>
Date: Tue Oct 20 19:51:37 2015 -0400
Fix off-by-one error in cookedprint
Discovered by Yves Younan and Aleksander Nikolich of Cisco Talos
and assigned tracking ID TALOS-CAN-0063.
---
ntpq/ntpq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c
index 9b29112..d3182fd 100644
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -3258,7 +3258,7 @@ cookedprint(
if (output_raw != 0) {
atoascii(name, MAXVARLEN, bn, sizeof(bn));
- atoascii(value, MAXVALLEN, bv, sizeof(bv));
+ atoascii(value, MAXVALLEN, bv, sizeof(bv)-1);
if (output_raw != '*') {
len = strlen(bv);
bv[len] = output_raw;
More information about the vc
mailing list