From b3443597e2eedd2b64630ccd5ec43cf0b3c5f148 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 29 Jun 2001 01:15:28 +0000 Subject: Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping source and destination. (This used to be commit 30411d4004ce7062e73506d228ef402b99226eee) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/util_str.c') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 1c1b31a83c..d52ff82b10 100644 --- a/source3/lib/util_str.c +++ b/source3/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; } -- cgit