aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2012-08-19 11:40:37 +1000
committerSteve Bennett <steveb@workware.net.au>2012-08-19 11:40:37 +1000
commita52d1cc85cf79df744819ff7247d33739c1af0a9 (patch)
treee2b5bdc60486f83bdcdc2893318536ca035fe72c
parent8f2b66b05d90a3650886911d5926142b91c08c7d (diff)
downloadjimtcl-a52d1cc85cf79df744819ff7247d33739c1af0a9.zip
jimtcl-a52d1cc85cf79df744819ff7247d33739c1af0a9.tar.gz
jimtcl-a52d1cc85cf79df744819ff7247d33739c1af0a9.tar.bz2
Fix buffer overflow in [info references]
Need to account for the null terminator Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 03a564b..de1f283 100644
--- a/jim.c
+++ b/jim.c
@@ -13828,7 +13828,7 @@ static int JimInfoReferences(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
htiter = Jim_GetHashTableIterator(&interp->references);
while ((he = Jim_NextHashEntry(htiter)) != NULL) {
- char buf[JIM_REFERENCE_SPACE];
+ char buf[JIM_REFERENCE_SPACE + 1];
Jim_Reference *refPtr = he->u.val;
const unsigned long *refId = he->key;