The Samba-Bugzilla – Attachment 5106 Details for
Bug 7005
mangle method = hash truncates files with dot '.' character
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for 3.4.4.
0001-Fix-bug-7005-mangle-method-hash-truncates-files.patch (text/plain), 1.30 KB, created by
Jeremy Allison
on 2009-12-21 23:14:46 UTC
(
hide
)
Description:
git-am format patch for 3.4.4.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-12-21 23:14:46 UTC
Size:
1.30 KB
patch
obsolete
>From 8bead17bda7404703e8257c8464b8192441e7f0d Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 21 Dec 2009 21:12:33 -0800 >Subject: [PATCH] Fix bug 7005 - mangle method = hash truncates files with dot '.' character > >Don't change the contents of a const string via a pointer >alias (or if you do, change it back.....). > >Jeremy. >--- > source3/smbd/mangle_hash.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > >diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c >index b582d19..6679b31 100644 >--- a/source3/smbd/mangle_hash.c >+++ b/source3/smbd/mangle_hash.c >@@ -429,6 +429,13 @@ static void cache_mangled_name( const char mangled_name[13], > if( !s1[i] && !s2[i] ) { > /* Truncate at the '.' */ > *s1 = '\0'; >+ /* >+ * DANGER WILL ROBINSON - this >+ * is changing a const string via >+ * an aliased pointer ! Remember to >+ * put it back once we've used it. >+ * JRA >+ */ > *s2 = '\0'; > } > } >@@ -440,6 +447,8 @@ static void cache_mangled_name( const char mangled_name[13], > } else { > 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 = '.'; > } > > /* ************************************************************************** ** >-- >1.6.0.4 >
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:
vl
:
review+
Actions:
View
Attachments on
bug 7005
: 5106 |
5107