On Wed, 15 Apr 2026 14:25:43 +0200, Thorsten Blum wrote:
> kasprintf_strarray() returns an array of N strings and kfree_strarray()
> also frees N entries. However, kasprintf_strarray() currently allocates
> N+1 char pointers. Allocate exactly N pointers instead of N+1.
>
> Also update the kernel-doc for @n.
>
>
> [...]
Applied to for-next/hardening, thanks!
[1/2] lib/string_helpers: drop redundant allocation in kasprintf_strarray
https://git.kernel.org/kees/c/233e1ab98026
[2/2] lib/string_helpers: annotate struct strarray with __counted_by_ptr
https://git.kernel.org/kees/c/8f64fb098a5b
Take care,
--
Kees Cook