FORTIFY_SOURCE: emphasize prevention in error messages.
FORTIFY_SOURCE prevents buffer overflows from occurring.
However, the error message often implies that we only
detect it, not prevent it.
Bring more clarity to the error messages by emphasizing
prevention over detection.
Change-Id: I5f3e1478673bdfc589e6cc4199fce8e52e197a24
diff --git a/libc/bionic/__recvfrom_chk.cpp b/libc/bionic/__recvfrom_chk.cpp
index 10a4263..3a9dab6 100644
--- a/libc/bionic/__recvfrom_chk.cpp
+++ b/libc/bionic/__recvfrom_chk.cpp
@@ -37,7 +37,7 @@
const struct sockaddr* src_addr, socklen_t* addrlen)
{
if (__predict_false(len > buflen)) {
- __fortify_chk_fail("recvfrom overflow", 0);
+ __fortify_chk_fail("recvfrom buffer overflow prevented", 0);
}
return recvfrom(socket, buf, len, flags, src_addr, addrlen);