summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-29 20:41:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:05 -0500
commitb04c782281bcb6a9b13168dacdae59898dd9fe7f (patch)
treeddae1d681fdcfd4d146dbe5aaac6e1edeebe6b0b
parent7310ba1b18a8971d432be0cee59b25c1d16383b9 (diff)
downloadsamba-b04c782281bcb6a9b13168dacdae59898dd9fe7f.tar.gz
samba-b04c782281bcb6a9b13168dacdae59898dd9fe7f.tar.bz2
samba-b04c782281bcb6a9b13168dacdae59898dd9fe7f.zip
r1301: Fix bogus error message when using "mangling method = hash" rather
than hash2. We are already calculating lengths so just use memcpy not safe_strcpy(). Jeremy. (This used to be commit a5a3df78531dc5400088e1746d6a7cd29f56a714)
-rw-r--r--source3/smbd/mangle_hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 7b8cbdbddb..d7239b82a7 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -546,8 +546,10 @@ static void cache_mangled_name( char *mangled_name, char *raw_name )
/* Fill the new cache entry, and add it to the cache. */
s1 = (char *)(new_entry + 1);
s2 = (char *)&(s1[mangled_len + 1]);
- safe_strcpy( s1, mangled_name, mangled_len );
- safe_strcpy( s2, raw_name, raw_len );
+ memcpy( s1, mangled_name, mangled_len );
+ s1[mangled_len] = '\0';
+ memcpy( s2, raw_name, raw_len );
+ s2[raw_len] = '\0';
ubi_cachePut( mangled_cache, i, new_entry, s1 );
}