diff options
author | Michael Brown | 2016-05-09 17:01:06 +0200 |
---|---|---|
committer | Michael Brown | 2016-05-09 17:23:38 +0200 |
commit | a966570dce690a5eba139fd941e12e4c6d445e22 (patch) | |
tree | 81fc5771e4d0245569140fdfba8063d18ad8e2b6 /src/core/string.c | |
parent | [efi] Allow for building with older versions of elf.h system header (diff) | |
download | ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.tar.gz ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.tar.xz ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.zip |
[libc] Avoid implicit assumptions about potentially-optimised memcpy()
Do not assume that an architecture-specific optimised memcpy() will
have the same properties as generic_memcpy() in terms of handling
overlapping regions.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/string.c')
-rw-r--r-- | src/core/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/string.c b/src/core/string.c index 3e658e54..5a185e63 100644 --- a/src/core/string.c +++ b/src/core/string.c @@ -81,7 +81,7 @@ void * generic_memmove ( void *dest, const void *src, size_t len ) { uint8_t *dest_bytes = ( dest + len ); if ( dest < src ) - return memcpy ( dest, src, len ); + return generic_memcpy ( dest, src, len ); while ( len-- ) *(--dest_bytes) = *(--src_bytes); return dest; |