android_kernel_samsung_a7y1.../sound/soc
Takashi Iwai f293ff98ac ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output
commit 6c89ffea60aa3b2a33ae7987de1e84bfb89e4c9e upstream.

dpcm_show_state() invokes multiple snprintf() calls to concatenate
formatted strings on the fixed size buffer.  The usage of snprintf()
is supposed for avoiding the buffer overflow, but it doesn't work as
expected because snprintf() doesn't return the actual output size but
the size to be written.

Fix this bug by replacing all snprintf() calls with scnprintf()
calls.

Fixes: f86dcef87b77 ("ASoC: dpcm: Add debugFS support for DPCM")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20200218111737.14193-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:10:32 +02:00
..
adi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m 2020-04-07 13:56:44 +02:00
au1x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bcm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blackfin A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cirrus A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
codecs ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls 2020-04-07 13:42:52 +02:00
davinci ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs 2020-04-07 13:42:18 +02:00
dwc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fsl ASoC: imx-sgtl5000: put of nodes if finding codec fails 2020-04-07 13:40:11 +02:00
generic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel ASoC: Intel: Fix use of potentially uninitialized variable 2020-04-07 07:40:18 +02:00
jz4740 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kirkwood ASoC: kirkwood: fix external clock probe defer 2020-04-07 12:40:47 +02:00
mediatek A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mxs A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nuc900 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
omap A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pxa A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qcom ASoC: qcom: Fix of-node refcount unbalance to link->codec_of_node 2020-04-07 13:49:19 +02:00
rockchip ASoc: rockchip: i2s: Fix RPM imbalance 2020-04-07 09:28:55 +02:00
samsung A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting 2020-04-07 09:26:42 +02:00
sirf A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spear A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sti A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sunxi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tegra A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
txx9 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ux500 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xtensa A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zte A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-ac97.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-cache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-compress.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-dapm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-devres.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set 2020-04-07 07:39:12 +02:00
soc-io.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-jack.c ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report 2020-04-07 13:07:07 +02:00
soc-ops.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-pcm.c ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output 2020-04-07 14:10:32 +02:00
soc-topology.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc-utils.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30