Re: [PATCH next 2/3] fortify: Optimise strnlen()
From: Kees Cook
Date: Tue Mar 31 2026 - 19:53:05 EST
On Tue, Mar 31, 2026 at 11:09:14PM +0100, David Laight wrote:
> Any uses should be replaced by __builtin_strlen().
When I looked at this before, __builtin_strlen() flip to run-time strlen
on non-constant strings, which is why I had to jump through all the
hoops to avoid calling it in those cases.
--
Kees Cook