diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-03-13 14:03:34 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-13 15:49:58 +0100 |
commit | 578194290d0bf85b087e73e35ea74574012cfd96 (patch) | |
tree | 86883924145abb7c8f2c8ced40285c7341d3f889 /sound/soc/codecs/max98357a.c | |
parent | ASoC: topology: Perform component check upfront (diff) | |
download | linux-578194290d0bf85b087e73e35ea74574012cfd96.tar.xz linux-578194290d0bf85b087e73e35ea74574012cfd96.zip |
ASoC: wm_adsp: Use scnprintf() for the limited buffer output
snprintf() is a hard-to-use function, it's especially difficult to use
it for concatenating substrings in a buffer with a limited size.
Since snprintf() returns the would-be-output size, not the actual
size, the subsequent use of snprintf() may point to the incorrect
position.
Use scnprintf() instead for fixing such potential errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200313130334.9028-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98357a.c')
0 files changed, 0 insertions, 0 deletions