1
0
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:
Luke Leighton 0001-01-01 00:00:00 +00:00
parent 389c17a225
commit 47e54d049a

View File

@ -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;