summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-29 01:15:28 +0000
committerTim Potter <tpot@samba.org>2001-06-29 01:15:28 +0000
commitb3443597e2eedd2b64630ccd5ec43cf0b3c5f148 (patch)
treeaaa684e65c8f31c1099128ff5d373b1dd6ceb71d
parent5fb9a869b7e56ca567eae43d85079c37f246daec (diff)
downloadsamba-b3443597e2eedd2b64630ccd5ec43cf0b3c5f148.tar.gz
samba-b3443597e2eedd2b64630ccd5ec43cf0b3c5f148.tar.bz2
samba-b3443597e2eedd2b64630ccd5ec43cf0b3c5f148.zip
Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping
source and destination. (This used to be commit 30411d4004ce7062e73506d228ef402b99226eee)
-rw-r--r--source3/lib/util_str.c2
1 files changed, 1 insertions, 1 deletions
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;
}