summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-10-07 19:54:50 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-10-07 19:54:50 +0000
commit416e59089a22c0b3d3bc4c91920db5db438d2855 (patch)
tree9f745a055ac927cbfb1acb3a793f574d5895165d /sys/lib/libsa
parent34ce07416604f2dec184920f0c70e7d98de287a2 (diff)
bcopy() is expected to be overlap safe, so it implement it with memmove()
not memcpy(). 'oh oh' deraadt@
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/stand.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h
index 590f7c06089..5bf6cddf699 100644
--- a/sys/lib/libsa/stand.h
+++ b/sys/lib/libsa/stand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stand.h,v 1.63 2016/08/27 04:57:30 guenther Exp $ */
+/* $OpenBSD: stand.h,v 1.64 2017/10/07 19:54:49 guenther Exp $ */
/* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */
/*-
@@ -143,7 +143,7 @@ __dead void panic(const char *, ...) __attribute__((noreturn));
__dead void _rtt(void) __attribute__((noreturn));
#define bzero(s,n) ((void)memset((s),0,(n)))
#define bcmp(s1,s2,n) (memcmp((s2),(s1),(n)))
-#define bcopy(s1,s2,n) ((void)memcpy((s2),(s1),(n)))
+#define bcopy(s1,s2,n) ((void)memmove((s2),(s1),(n)))
void explicit_bzero(void *, size_t);
void *memcpy(void *, const void *, size_t);
int memcmp(const void *, const void *, size_t);