Re: [PATCH 6/8] sound: Fix buffer overflow in square wave generation

Tom Rini
2022-04-29T18:05:05Z

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On Sun, Apr 03, 2022 at 10:39:13AM +0000, Andrew Scull wrote:

> Data is written for each channel but is only tracked as having one
> channel written. This resulted in a buffer overflow and corruption of
> the allocator's metadata which caused further problems when the buffer
> was later freed. This could be observed with sandbox unit tests.
>
> Resolve the overflow by tracking the writes for each channel.
>
> Fixes: f987177db9 ("dm: sound: Use the correct number of channels for sound")
> Signed-off-by: Andrew Scull <ascull@google.com>
> Cc: Simon Glass <sjg@chromium.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

--
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]