This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[kai/samba.git] / source3 / smbd / mangle_hash.c
index 929cb0e07fa53387d1763d04eeab6b7342a20644..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 );
 }
 
@@ -730,7 +730,7 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83)
        DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName,
                 need83 ? "True" : "False", cache83 ? "True" : "False"));
        
-       if (push_ucs2_allocate(&OutName_ucs2, OutName) < 0) {
+       if (push_ucs2_allocate(&OutName_ucs2, OutName) == (size_t)-1) {
                DEBUG(0, ("push_ucs2_allocate failed!\n"));
                return;
        }