diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/mangle_hash.c | 6 |
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 ); } |