1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping

source and destination.
(This used to be commit 30411d4004)
This commit is contained in:
Tim Potter 2001-06-29 01:15:28 +00:00
parent 5fb9a869b7
commit b3443597e2

View File

@ -894,7 +894,7 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength)
len = maxlength;
}
memcpy(dest, src, len);
memmove(dest, src, len);
dest[len] = 0;
return dest;
}