diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-05-09 16:01:06 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-05-09 16:23:38 +0100 |
commit | a966570dce690a5eba139fd941e12e4c6d445e22 (patch) | |
tree | 81fc5771e4d0245569140fdfba8063d18ad8e2b6 /src | |
parent | 45cd68c0fb45bc8d83adc3832a6ed08a02bee822 (diff) | |
download | ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.zip ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.tar.gz ipxe-a966570dce690a5eba139fd941e12e4c6d445e22.tar.bz2 |
[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')
-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 3e658e5..5a185e6 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; |