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_hash2.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_hash2.c')
-rw-r--r-- | source3/smbd/mangle_hash2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index dcfd7663ba..f68873687b 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -362,10 +362,8 @@ static void mangle_reset(void) /* try to find a 8.3 name in the cache, and if found then replace the string with the original long name. - - The filename must be able to hold at least sizeof(fstring) */ -static BOOL check_cache(char *name) +static BOOL check_cache(char *name, size_t maxlen) { u32 hash, multiplier; unsigned int i; @@ -403,10 +401,10 @@ static BOOL check_cache(char *name) if (extension[0]) { M_DEBUG(10,("check_cache: %s -> %s.%s\n", name, prefix, extension)); - slprintf(name, sizeof(fstring), "%s.%s", prefix, extension); + slprintf(name, maxlen, "%s.%s", prefix, extension); } else { M_DEBUG(10,("check_cache: %s -> %s\n", name, prefix)); - fstrcpy(name, prefix); + safe_strcpy(name, prefix, maxlen); } return True; |