Re: [PATCH] ASoC: soc-core: reset rtd->num_components after allocation

From: Mark Brown

Date: Wed Nov 11 2026 - 08:23:39 EST


On Tue, Nov 10, 2026 at 09:59:12PM -0800, Kees Cook wrote:

> For example, what keeps snd_soc_rtd_add_component() from overflowing
> that array? If you want to protect the array, add another member, say
> max_component, and use that for the counter, which gets set at
> allocation time and protects the array from indexing beyond the actual
> allocation size.

We could do that, and it'd certainly be good to do so, but anything
that's in a position to do anything here will already have sufficient
access to the system that it can just directly cause issues.

Please fix your mail client to word wrap within paragraphs at something
substantially less than 80 columns. Doing this makes your messages much
easier to read and reply to.

Attachment: signature.asc
Description: PGP signature