1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

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 commit is contained in:
Jeremy Allison 2004-06-29 20:41:29 +00:00 committed by Gerald (Jerry) Carter
parent 451d289f69
commit a5a3df7853

View File

@ -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. */ /* Fill the new cache entry, and add it to the cache. */
s1 = (char *)(new_entry + 1); s1 = (char *)(new_entry + 1);
s2 = (char *)&(s1[mangled_len + 1]); s2 = (char *)&(s1[mangled_len + 1]);
safe_strcpy( s1, mangled_name, mangled_len ); memcpy( s1, mangled_name, mangled_len );
safe_strcpy( s2, raw_name, raw_len ); s1[mangled_len] = '\0';
memcpy( s2, raw_name, raw_len );
s2[raw_len] = '\0';
ubi_cachePut( mangled_cache, i, new_entry, s1 ); ubi_cachePut( mangled_cache, i, new_entry, s1 );
} }