> (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
> functions).
>
> As found with Coccinelle[1], add __counted_by for struct hda_conn_list.
>
> [1]
> https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
>
> Cc: Ja
ember, move its initialization earlier.
>
> [1]
> https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
>
> Cc: Jaroslav Kysela
> Cc: Takashi Iwai
> Cc: alsa-de...@alsa-project.org
> Signed-off-by: Kees Cook
Applied now. Thanks.
Takashi
On Fri, 29 Sep 2023 17:59:22 +0200,
Gustavo A. R. Silva wrote:
>
> `struct urb` is a flexible structure, which means that it contains a
> flexible-array member at the bottom. This could potentially lead to an
> overwrite of the objects following `receiver` in `struct comm_runtime`,
> among them so
On Fri, 29 Sep 2023 18:06:32 +0200,
Gustavo A. R. Silva wrote:
>
> `struct urb` is a flexible structure, which means that it contains a
> flexible-array member at the bottom. This could potentially lead to an
> overwrite of the objects following `out_urb` in `struct midi_runtime`,
> among them a f
On Tue, 26 Mar 2024 02:59:34 +0100,
Gustavo A. R. Silva wrote:
>
> Use the `DEFINE_FLEX()` helper for an on-stack definition of a
> flexible structure where the size of the flexible-array member
> is known at compile-time, and refactor the rest of the code,
> accordingly.
>
> So, with these chang
On Tue, 29 Oct 2024 13:11:32 +0100,
Amadeusz Sławiński wrote:
>
> On 10/29/2024 11:30 AM, Takashi Iwai wrote:
> > On Tue, 29 Oct 2024 10:50:21 +0100,
> > Amadeusz Sławiński wrote:
> >>
> >> On 10/28/2024 11:50 PM, Aleksei Vetrov wrote:
> >>> The w
On Tue, 29 Oct 2024 10:50:21 +0100,
Amadeusz Sławiński wrote:
>
> On 10/28/2024 11:50 PM, Aleksei Vetrov wrote:
> > The widgets array in the snd_soc_dapm_widget_list has a __counted_by
> > attribute attached to it, which points to the num_widgets variable. This
> > attribute is used in bounds chec
On Sat, 08 Mar 2025 19:52:59 +0100,
Ethan Carter Edwards wrote:
>
> We are trying to get rid of all multiplications from allocation
> functions to prevent potential integer overflows. Here the
> multiplication is probably safe, but using kcalloc() is more
> appropriate and improves readability. Th