diff options
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r-- | payloads/libpayload/libc/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/memory.c b/payloads/libpayload/libc/memory.c index bf1f99b212..afc38cb263 100644 --- a/payloads/libpayload/libc/memory.c +++ b/payloads/libpayload/libc/memory.c @@ -46,6 +46,7 @@ void *memset(void *s, int c, size_t n) void *memcpy(void *dst, const void *src, size_t n) { int i; + void *ret = dst; for(i = 0; i < n % sizeof(unsigned long); i++) ((unsigned char *) dst)[i] = ((unsigned char *) src)[i]; @@ -57,7 +58,7 @@ void *memcpy(void *dst, const void *src, size_t n) for(i = 0; i < n / sizeof(unsigned long); i++) ((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; - return dst; + return ret; } void *memmove(void *dst, const void *src, size_t n) |