aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-02-18 12:17:37 +0100
committerMark Brown <broonie@kernel.org>2020-02-19 13:36:16 +0000
commit6c89ffea60aa3b2a33ae7987de1e84bfb89e4c9e (patch)
tree0cfc14d424689fe2d30059103a876b8510f4dad4 /sound/soc/soc-topology.c
parentASoC: intel: skl: Fix possible buffer overflow in debug outputs (diff)
downloadlinux-dev-6c89ffea60aa3b2a33ae7987de1e84bfb89e4c9e.tar.xz
linux-dev-6c89ffea60aa3b2a33ae7987de1e84bfb89e4c9e.zip
ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output
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>
Diffstat (limited to 'sound/soc/soc-topology.c')
0 files changed, 0 insertions, 0 deletions