StrnCpy -> safe_strcpy() on a over-malloced struct.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 23 Apr 2003 13:35:10 +0000 (13:35 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 23 Apr 2003 13:35:10 +0000 (13:35 +0000)
Andrew Bartlett
(This used to be commit e4f1171d57a6186f85b87586a525b3bbaf601974)

source3/smbd/mangle_hash.c

index e220d2f6d2b8e4c61e53174a444a4e00bf3745e2..d2eb996899caef40ccb92be8675f3dd43ee1fa46 100644 (file)
@@ -556,8 +556,8 @@ 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]);
-       (void)StrnCpy( s1, mangled_name, mangled_len );
-       (void)StrnCpy( s2, raw_name,     raw_len );
+       safe_strcpy( s1, mangled_name, mangled_len );
+       safe_strcpy( s2, raw_name,     raw_len );
        ubi_cachePut( mangled_cache, i, new_entry, s1 );
 }