diff options
author | 2013-06-15 18:43:15 +0000 | |
---|---|---|
committer | 2013-06-15 18:43:15 +0000 | |
commit | af28a4e1845fd11be1ff2e08c44ebaae8fd62b6a (patch) | |
tree | d8725f06516e5fbc173bac544e1c07cb6ffaadca /sys/lib/libkern/arch | |
parent | give bcopy() the ovbcopy() semantics (diff) | |
download | wireguard-openbsd-af28a4e1845fd11be1ff2e08c44ebaae8fd62b6a.tar.xz wireguard-openbsd-af28a4e1845fd11be1ff2e08c44ebaae8fd62b6a.zip |
Don't return garbage in memcpy() but the original destination pointer.
Diffstat (limited to 'sys/lib/libkern/arch')
-rw-r--r-- | sys/lib/libkern/arch/sh/memmove.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/lib/libkern/arch/sh/memmove.S b/sys/lib/libkern/arch/sh/memmove.S index eb82a8aa98e..d879c8a258e 100644 --- a/sys/lib/libkern/arch/sh/memmove.S +++ b/sys/lib/libkern/arch/sh/memmove.S @@ -46,6 +46,7 @@ ENTRY(memmove) bf/s bcopy_overlap ENTRY(memcpy) + mov REG_DST,REG_DST0 cmp/eq REG_DST,REG_SRC /* if ( src == dst ) return; */ bt/s bcopy_return mov REG_SRC,r0 |