diff options
author | Jeremy Allison <jra@samba.org> | 1997-09-26 18:55:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-09-26 18:55:29 +0000 |
commit | cef59090bb2fd3f8a9efd1a453cb90264b891d58 (patch) | |
tree | 694593e9501de3a8aa6966d7e0f9118c29b28447 /source3/smbd/mangle.c | |
parent | 5a7b3294dbbe88f0d5da25a74b8112fc6c70af1f (diff) | |
download | samba-cef59090bb2fd3f8a9efd1a453cb90264b891d58.tar.gz samba-cef59090bb2fd3f8a9efd1a453cb90264b891d58.tar.bz2 samba-cef59090bb2fd3f8a9efd1a453cb90264b891d58.zip |
Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit e7eb1f044d3101679dc7a118820ea5efe0cd837c)
Diffstat (limited to 'source3/smbd/mangle.c')
-rw-r--r-- | source3/smbd/mangle.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 3f753cf855..b0a45ffb47 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -273,7 +273,7 @@ BOOL check_mangled_stack(char *s) } if (check_extension && !strchr(mangled_stack[i],'.')) { - strcpy(tmpname,mangled_stack[i]); + pstrcpy(tmpname,mangled_stack[i]); strcat(tmpname,extension); mangle_name_83(tmpname); if (strequal(tmpname,s)) @@ -307,7 +307,7 @@ static char *map_filename(char *s, /* This is null terminated */ pstring pat; StrnCpy(pat, pattern, len); /* Get pattern into a proper string! */ - strcpy(matching_bit,""); /* Match but no star gets this. */ + pstrcpy(matching_bit,""); /* Match but no star gets this. */ pp = pat; /* Initialise the pointers. */ sp = s; if ((len == 1) && (*pattern == '*')) { @@ -446,7 +446,7 @@ static void do_fwd_mangled_map(char *s, char *MangledMap) continue; /* Always check for the end. */ } if (*end == '*') { - strcpy(np, match_string); + pstrcpy(np, match_string); np += strlen(match_string); end++; /* Skip the '*' */ while ((*end) /* Not the end of string. */ @@ -460,7 +460,7 @@ static void do_fwd_mangled_map(char *s, char *MangledMap) } *np++ = '\0'; /* NULL terminate it. */ DEBUG(5,("End of second in pair '%s'\n", end)); - strcpy(s, new_string); /* Substitute with the new name. */ + pstrcpy(s, new_string); /* Substitute with the new name. */ DEBUG(5,("s is now '%s'\n", s)); } start = end; /* Skip a bit which cannot be wanted */ |