diff options
Diffstat (limited to 'libc/bionic/__memmove_chk.cpp')
-rw-r--r-- | libc/bionic/__memmove_chk.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libc/bionic/__memmove_chk.cpp b/libc/bionic/__memmove_chk.cpp index b52f7c8..26bd646 100644 --- a/libc/bionic/__memmove_chk.cpp +++ b/libc/bionic/__memmove_chk.cpp @@ -41,13 +41,12 @@ * This memmove check is called if _FORTIFY_SOURCE is defined and * greater than 0. */ -extern "C" void *__memmove_chk (void *dest, const void *src, - size_t len, size_t dest_len) -{ - if (__predict_false(len > dest_len)) { - __fortify_chk_fail("memmove prevented write past end of buffer", - BIONIC_EVENT_MEMMOVE_BUFFER_OVERFLOW); - } +extern "C" void* __memmove_chk (void* dest, const void* src, + size_t len, size_t dest_len) { + if (__predict_false(len > dest_len)) { + __fortify_chk_fail("memmove: prevented write past end of buffer", + BIONIC_EVENT_MEMMOVE_BUFFER_OVERFLOW); + } - return memmove(dest, src, len); + return memmove(dest, src, len); } |