diff options
author | Steve Bennett <steveb@workware.net.au> | 2012-08-19 11:40:37 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2012-08-19 11:40:37 +1000 |
commit | a52d1cc85cf79df744819ff7247d33739c1af0a9 (patch) | |
tree | e2b5bdc60486f83bdcdc2893318536ca035fe72c | |
parent | 8f2b66b05d90a3650886911d5926142b91c08c7d (diff) | |
download | jimtcl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |