diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-02-18 10:14:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-28 15:38:47 +0100 |
commit | 8ecbef0b75f4e9a70c8d240be5d417e824019605 (patch) | |
tree | faca65ba67339bbf368b0424e85a2a85dcd50cc8 /sound/mips | |
parent | de87ebf1c9b36b241fe4d8b0cdc557552330fca2 (diff) |
ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs
commit 44eeb081b8630bb3ad3cd381d1ae1831463e48bb upstream.
Some code in HD-audio driver calls snprintf() in a loop and still
expects that the return value were actually written size, while
snprintf() returns the expected would-be length instead. When the
given buffer limit were small, this leads to a buffer overflow.
Use scnprintf() for addressing those issues. It returns the actually
written size unlike snprintf().
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200218091409.27162-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/mips')
0 files changed, 0 insertions, 0 deletions