Skip to content
Unverified Commit 549cd0ba authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown
Browse files

ASoC: intel: skl: Fix possible buffer overflow in debug outputs

The debugfs output of intel skl driver writes strings with multiple
snprintf() calls with the fixed size.  This was supposed to avoid the
buffer overflow but actually it still would, because snprintf()
returns the expected size to be output, not the actual output size.

Fix it by replacing snprintf() calls with scnprintf().

Fixes: d14700a0

 ("ASoC: Intel: Skylake: Debugfs facility to dump module config")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20200218111737.14193-3-tiwai@suse.de
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 64bbacc5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment