]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/string_helpers: annotate struct strarray with __counted_by_ptr
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 15 Apr 2026 12:25:45 +0000 (14:25 +0200)
committerKees Cook <kees@kernel.org>
Wed, 13 May 2026 17:54:08 +0000 (10:54 -0700)
commit8f64fb098a5b1dfea57989fdf732b6168f0e1c35
tree026458de4d29d61bc179c04fa43b112d883d013c
parent233e1ab980269394bfa78191ac12446cc6a22683
lib/string_helpers: annotate struct strarray with __counted_by_ptr

Add the __counted_by_ptr() compiler attribute to 'array' to improve
bounds checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260415122542.370926-6-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
lib/string_helpers.c