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
This commit is contained in:
@@ -57,7 +57,7 @@ extern "C" size_t __strlen_chk(const char *s, size_t s_len) {
|
||||
size_t ret = strlen(s);
|
||||
|
||||
if (__predict_false(ret >= s_len)) {
|
||||
__fortify_chk_fail("strlen read overflow", 0);
|
||||
__fortify_chk_fail("strlen buffer overrun prevented", 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user