git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df13b13
)
Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value...
author
Jeremy Allison
<jra@samba.org>
Thu, 18 Feb 2010 20:21:10 +0000
(12:21 -0800)
committer
Jeremy Allison
<jra@samba.org>
Thu, 18 Feb 2010 20:21:10 +0000
(12:21 -0800)
The charset array allocated in init_chartest() is allocated
by MALLOC, but only some elements of it being set after allocation. Fix is to
memset to zero after allocation.
Jeremy.
source3/smbd/mangle_hash.c
patch
|
blob
|
history
diff --git
a/source3/smbd/mangle_hash.c
b/source3/smbd/mangle_hash.c
index 1482d10b7a240388b8c1d739cda0d76c36cf1c07..d1af0994a8ce1528e93264f02f066ff8e979a2c9 100644
(file)
--- a/
source3/smbd/mangle_hash.c
+++ b/
source3/smbd/mangle_hash.c
@@
-331,6
+331,7
@@
static void init_chartest( void )
chartest = SMB_MALLOC_ARRAY(unsigned char, 256);
SMB_ASSERT(chartest != NULL);
+ memset(chartest, '\0', 256);
for( s = (const unsigned char *)basechars; *s; s++ ) {
chartest[*s] |= BASECHAR_MASK;