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

Tom Rini trini at konsulko.com
Fri Apr 29 20:03:40 CEST 2022


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 at google.com>
> Cc: Simon Glass <sjg at chromium.org>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220429/1068394b/attachment.sig>


More information about the U-Boot mailing list