u-boot/drivers/sound
Andrew Scull 49209da54f 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: 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>
2022-04-29 11:11:36 -04:00
..
broadwell_i2s.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
broadwell_i2s.h x86: sound: Add support for broadwell I2S 2019-02-20 15:27:11 +08:00
broadwell_sound.c x86: sound: Add sound support for samus (broadwell) 2019-02-20 15:27:11 +08:00
codec-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
da7219.c x86: sound: Correct error handling 2020-11-06 09:51:29 +08:00
hda_codec.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
i2s-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
i8254_beep.c sound: Add a driver for the i8254 beep 2019-02-20 15:27:10 +08:00
ivybridge_sound.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Kconfig sound: Add an ACPI driver for Maxim MAX98357ac 2020-07-17 14:32:24 +08:00
Makefile sound: Add an ACPI driver for Maxim MAX98357ac 2020-07-17 14:32:24 +08:00
max98088.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
max98088.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
max98090.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
max98090.h dm: sound: exynos: Add support for max98090 2018-12-13 16:36:30 -07:00
max98095.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
max98095.h dm: sound: Fix license headers 2018-12-13 16:36:41 -07:00
max98357a.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
maxim_codec.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
maxim_codec.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
rockchip_i2s.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rockchip_sound.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rt5677.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
rt5677.h sound: Add a driver for RealTek RT5677 2019-02-20 15:27:11 +08:00
samsung-i2s.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
samsung_sound.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sound-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sound.c sound: Fix buffer overflow in square wave generation 2022-04-29 11:11:36 -04:00
tegra_ahub.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
tegra_i2s.c tegra: i2c: Drop LOG_DEBUG 2021-03-27 13:59:36 +13:00
tegra_i2s_priv.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
tegra_sound.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
wm8994.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
wm8994.h dm: sound: Start i2c IDs from 0 2018-12-13 16:32:49 -07:00
wm8994_registers.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00