Use __predict_false on some fortify methods.
Give the compiler some hints that these error conditions are unlikely to occur in practice. Change-Id: Ifaf7322a12120ef663c8315c1a18c2dcbe4bda23
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
extern "C" size_t __strlcat_chk(char *dest, const char *src,
|
||||
size_t supplied_size, size_t dest_len_from_compiler)
|
||||
{
|
||||
if (supplied_size > dest_len_from_compiler) {
|
||||
if (__predict_false(supplied_size > dest_len_from_compiler)) {
|
||||
__fortify_chk_fail("strlcat buffer overflow", 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user