staging: rtl8192e: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 09:24:50 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 08:23:59 +0000 (09:23 +0100)
commit39ddadf14da77c5c7176e0395db5f832b7da06c0
treed8b998139dcc660caf3d581b5ea0ab04cb1f46a2
parent72e7375cafc12eaac17f774872fd24f4de1a5c07
staging: rtl8192e: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-3-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_wx.c