diff options
author | Gerald Carter <jerry@samba.org> | 2004-07-22 13:39:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:15 -0500 |
commit | 0c6d7f28d6c1066cc6b3055ebf6a8fcf685ca1f6 (patch) | |
tree | aab81a105d51d7985421a12bb0496f35a4dc3a26 /source3/smbd/mangle_hash.c | |
parent | d810ffe58e9c6b3b71336f59b899012af9137fe7 (diff) | |
download | samba-0c6d7f28d6c1066cc6b3055ebf6a8fcf685ca1f6.tar.gz samba-0c6d7f28d6c1066cc6b3055ebf6a8fcf685ca1f6.tar.bz2 samba-0c6d7f28d6c1066cc6b3055ebf6a8fcf685ca1f6.zip |
r1570: merging changes from 3.0.5
(This used to be commit 430cf63b9148441bce42bfb15a8045de5da108f4)
Diffstat (limited to 'source3/smbd/mangle_hash.c')
-rw-r--r-- | source3/smbd/mangle_hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index d7239b82a7..13ec99a917 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -557,7 +557,7 @@ static void cache_mangled_name( char *mangled_name, char *raw_name ) * Check for a name on the mangled name stack * * Input: s - Input *and* output string buffer. - * + * maxlen - space in i/o string buffer. * Output: True if the name was found in the cache, else False. * * Notes: If a reverse map is found, the function will overwrite the string @@ -568,7 +568,7 @@ static void cache_mangled_name( char *mangled_name, char *raw_name ) * ************************************************************************** ** */ -static BOOL check_cache( char *s ) +static BOOL check_cache( char *s, size_t maxlen ) { ubi_cacheEntryPtr FoundPtr; char *ext_start = NULL; @@ -602,7 +602,7 @@ static BOOL check_cache( char *s ) if( !FoundPtr ) { if(saved_ext) { /* Replace the saved_ext as it was truncated. */ - (void)pstrcat( s, saved_ext ); + (void)safe_strcat( s, saved_ext, maxlen ); SAFE_FREE(saved_ext); } return( False ); @@ -612,10 +612,10 @@ static BOOL check_cache( char *s ) found_name = (char *)(FoundPtr + 1); found_name += (strlen( found_name ) + 1); - (void)pstrcpy( s, found_name ); + (void)safe_strcpy( s, found_name, maxlen ); if( saved_ext ) { /* Replace the saved_ext as it was truncated. */ - (void)pstrcat( s, saved_ext ); + (void)safe_strcat( s, saved_ext, maxlen ); SAFE_FREE(saved_ext); } |