From: Tim Potter Date: Fri, 29 Jun 2001 01:15:28 +0000 (+0000) Subject: Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping X-Git-Tag: samba-2.2.5pre1~1890^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30411d4004ce7062e73506d228ef402b99226eee;p=thirdparty%2Fsamba.git Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping source and destination. --- diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 1c1b31a83c0..d52ff82b100 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -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; }