]> git.baikalelectronics.ru Git - kernel.git/commit
fortify: Allow strlen() and strnlen() to pass compile-time known lengths
authorKees Cook <keescook@chromium.org>
Tue, 3 Aug 2021 05:51:31 +0000 (22:51 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 25 Sep 2021 15:20:50 +0000 (08:20 -0700)
commitba8d8296d7407d4dca677bb91332a14cc1da1eb5
tree21639a71e598f1fd3c9f51bf1adeb2d2bf8a06e4
parent709ac5b7f0cd60c480dc1be9fcb86279475a3a12
fortify: Allow strlen() and strnlen() to pass compile-time known lengths

Under CONFIG_FORTIFY_SOURCE, it is possible for the compiler to perform
strlen() and strnlen() at compile-time when the string size is known.
This is required to support compile-time overflow checking in strlcpy().

Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/fortify-string.h