summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-07-01 19:29:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-07-01 19:29:55 (GMT)
commit150fb8061fafd662e1aade945a3d72f5b9c6b241 (patch)
tree00b8de4d9c40daa961a07146523e4c05ed9c302b /generic
parent41be9233e936bad38645b3af83b5162df5fecefc (diff)
parentd17af2c7031e75fe6db40f547797f26eaa08af13 (diff)
downloadtcl-150fb8061fafd662e1aade945a3d72f5b9c6b241.zip
tcl-150fb8061fafd662e1aade945a3d72f5b9c6b241.tar.gz
tcl-150fb8061fafd662e1aade945a3d72f5b9c6b241.tar.bz2
Avoid valgrind issues with uninitialized memory
Diffstat (limited to 'generic')
-rw-r--r--generic/tclHash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 2265373..193664d 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -839,6 +839,7 @@ AllocStringEntry(
allocsize = sizeof(hPtr->key);
}
hPtr = ckalloc(TclOffset(Tcl_HashEntry, key) + allocsize);
+ memset(hPtr, 0, sizeof(Tcl_HashEntry) + allocsize - sizeof(hPtr->key));
memcpy(hPtr->key.string, string, size);
hPtr->clientData = 0;
return hPtr;