]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping
authorTim Potter <tpot@samba.org>
Fri, 29 Jun 2001 01:15:28 +0000 (01:15 +0000)
committerTim Potter <tpot@samba.org>
Fri, 29 Jun 2001 01:15:28 +0000 (01:15 +0000)
source and destination.

source/lib/util_str.c

index 1c1b31a83c00b1db7bed39bf564d5f6b22d806fb..d52ff82b100eeeb94ba6ffd60a6e0de089e1a4a2 100644 (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;
 }