Skip to content
Commit 49209da5 authored by Andrew Scull's avatar Andrew Scull Committed by Tom Rini
Browse files

sound: Fix buffer overflow in square wave generation



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: f987177d ("dm: sound: Use the correct number of channels for sound")
Signed-off-by: default avatarAndrew Scull <ascull@google.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent beb341ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment