mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
allow safe_strcpy() to pass 0 for max length of string, resulting in no
effect.
This commit is contained in:
parent
389c17a225
commit
47e54d049a
@ -743,6 +743,11 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
if (maxlength == 0)
|
||||
{
|
||||
return dest;
|
||||
}
|
||||
|
||||
if (!dest) {
|
||||
DEBUG(0,("ERROR: NULL dest in safe_strcpy\n"));
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user