summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-04-23 13:35:10 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-04-23 13:35:10 +0000
commit7ae247719739d0026849ee6b615f13b154b6bf3a (patch)
treea06a6c3a9fc359a79a40f660b812a9f0569ec547 /source3
parent2a3a9f0bf43c3bf99a71f7296bb5ff6199893fea (diff)
downloadsamba-7ae247719739d0026849ee6b615f13b154b6bf3a.tar.gz
samba-7ae247719739d0026849ee6b615f13b154b6bf3a.tar.bz2
samba-7ae247719739d0026849ee6b615f13b154b6bf3a.zip
StrnCpy -> safe_strcpy() on a over-malloced struct.
Andrew Bartlett (This used to be commit e4f1171d57a6186f85b87586a525b3bbaf601974)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/mangle_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index e220d2f6d2..d2eb996899 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -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 );
}