WSL2-Linux-Kernel/sound/soc/sof/intel
Takashi Iwai 6ee1310f4d ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf()
[ Upstream commit 94c1ceb043 ]

snprintf() returns the would-be-filled size when the string overflows
the given buffer size, hence using this value may result in the buffer
overflow (although it's unrealistic).

This patch replaces with a safer version, scnprintf() for papering
over such a potential issue.

Fixes: 29c8e4398f ("ASoC: SOF: Intel: hda: add extended rom status dump to error log")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801165420.25978-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-25 11:40:28 +02:00
..
Kconfig ASoC: SOF: Intel: Fix build error without SND_SOC_SOF_PCI_DEV 2022-04-08 14:24:15 +02:00
Makefile
apl.c ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00
atom.c
atom.h
bdw.c
byt.c
cnl.c ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00
ext_manifest.h
hda-bus.c ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended 2021-12-01 09:04:45 +01:00
hda-codec.c
hda-compress.c
hda-ctrl.c
hda-dai.c ASoC: SOF: Intel: hda-dai: fix potential locking issue 2021-11-25 09:48:26 +01:00
hda-dsp.c ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended 2021-12-01 09:04:45 +01:00
hda-ipc.c ASoC: SOF: Intel: hda-ipc: fix reply size checking 2021-08-03 01:44:59 +01:00
hda-ipc.h
hda-loader.c ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00
hda-pcm.c ASoC: SOF: Intel: enable DMI L1 for playback streams 2022-04-08 14:23:22 +02:00
hda-stream.c ASoC: SOF: Intel: simplify logic for DMI_L1 handling 2021-08-13 13:16:16 +01:00
hda-trace.c
hda.c ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf() 2022-08-25 11:40:28 +02:00
hda.h ASoC: SOF: intel: add snd_sof_dsp_check_sdw_irq ops 2021-08-02 15:45:40 +01:00
icl.c ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00
intel-ipc.c
pci-apl.c
pci-cnl.c
pci-icl.c
pci-tgl.c ASoC: SOF: Intel: pci-tgl: add ADL-N support 2021-12-29 12:29:01 +01:00
pci-tng.c ASoC: SOF: intel: remove duplicate include 2021-08-24 19:15:02 +01:00
shim.h ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00
tgl.c ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc 2022-08-25 11:40:28 +02:00