; (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
> functions).
>
> As found with Coccinelle[1], add __counted_by for struct i2c_atr.
>
> [1]
> https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
>
> Cc: Wolfram Sa
lexible array member, move its initialization earlier.
>
> [1]
> https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
>
> Cc: Wolfram Sang
> Cc: Peter Rosin
> Cc: linux-...@vger.kernel.org
> Signed-off-by: Kees Cook
Fixed a blank line and applied
On Wed, Sep 20, 2023 at 11:07:35AM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We should prefer more robust and less ambiguous string interfaces.
>
> `info.type` is expected to be NUL-terminated judging by its use in
> `i2c_new_clien
On Wed, Sep 20, 2023 at 08:08:52AM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We should prefer more robust and less ambiguous string interfaces.
>
> We expect name to be NUL-terminated based on its numerous uses with
> functions tha