diff options
author | Elliott Hughes <enh@google.com> | 2013-10-15 16:43:38 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-10-15 16:49:28 -0700 |
commit | d1eda33f012e46083b91e087fb79d14a5ce70f0e (patch) | |
tree | 2d075e9d43c3a300327e79ee27c5b8330d8dce4c /libc/bionic/__memmove_chk.cpp | |
parent | dc9d8d050a43e1cd32f1337e79187124bb15d938 (diff) | |
download | android_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.tar.gz android_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.tar.bz2 android_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.zip |
Avoid confusing "read prevented write" log messages.
Moving to a "function: message" style avoids ambiguity.
Change-Id: If9d590e50265c61725d3673bd03796e65edd2d5e
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 b52f7c882..26bd646cd 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); } |