[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Fri Feb 19 01:22:54 MST 2010
The branch, v3-5-test has been updated
via 7122d0e... Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.'
from fd906e7... Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when "mangling method = hash"
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 7122d0e97ca9edeea28c9e898e77f576a886471e
Author: Jeremy Allison <jra at samba.org>
Date: Thu Feb 18 11:22:44 2010 -0800
Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.'
Fix use of uninitialized variable. This can lead to crashes if
mangling = hash processes names with no '.'.
Jeremy.
(cherry picked from commit df13b1303a751962d8f7d5298b39e4a7500fef15)
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/mangle_hash.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index b54dd5c..d1af099 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -409,8 +409,8 @@ static void cache_mangled_name( const char mangled_name[13],
{
TDB_DATA data_val;
char mangled_name_key[13];
- char *s1;
- char *s2;
+ char *s1 = NULL;
+ char *s2 = NULL;
/* If the cache isn't initialized, give up. */
if( !tdb_mangled_cache )
@@ -449,7 +449,9 @@ static void cache_mangled_name( const char mangled_name[13],
DEBUG(5,("cache_mangled_name: Stored entry %s -> %s\n", mangled_name_key, raw_name));
}
/* Restore the change we made to the const string. */
- *s2 = '.';
+ if (s2) {
+ *s2 = '.';
+ }
}
/* ************************************************************************** **
--
Samba Shared Repository
More information about the samba-cvs
mailing list