diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/string/memmove.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/memmove.c b/src/string/memmove.c index 27f670e1..f225bb30 100644 --- a/src/string/memmove.c +++ b/src/string/memmove.c @@ -10,7 +10,7 @@ void *memmove(void *dest, const void *src, size_t n) const char *s = src; if (d==s) return d; - if (s+n <= d || d+n <= s) return memcpy(d, s, n); + if ((uintptr_t)s-(uintptr_t)d-n <= -2*n) return memcpy(d, s, n); if (d<s) { if ((uintptr_t)s % WS == (uintptr_t)d % WS) { |