The Samba-Bugzilla – Attachment 5385 Details for
Bug 7154
mangling method = hash can crash storing a name not containing a '.'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am patch for 3.3.11.
0001-Fix-bug-7154-mangling-method-hash-can-crash-storing-.patch (text/plain), 1.31 KB, created by
Jeremy Allison
on 2010-02-18 13:34:04 UTC
(
hide
)
Description:
git-am patch for 3.3.11.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-02-18 13:34:04 UTC
Size:
1.31 KB
patch
obsolete
>From 2529a25aa2262195ade0ebe412e2af6d49460c83 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 18 Feb 2010 11:22:44 -0800 >Subject: [PATCH] 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) >--- > source/smbd/mangle_hash.c | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c >index 7073c3c..c40b0b7 100644 >--- a/source/smbd/mangle_hash.c >+++ b/source/smbd/mangle_hash.c >@@ -411,8 +411,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 ) >@@ -451,7 +451,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 = '.'; >+ } > } > > /* ************************************************************************** ** >-- >1.6.6.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 7154
:
5383
|
5384
| 5385