staging/rtl8192e: Remove all strcpy() uses
authorLen Baker <len.baker@gmx.com>
Fri, 23 Jul 2021 17:32:16 +0000 (19:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jul 2021 13:20:56 +0000 (15:20 +0200)
commitcf79ee6eb0d7d5f45ad58c395ee855e2e1bbc9b2
tree0336633982e7fbccb9ff85fb50738a4ca8aee6e4
parent36174650c4283c9bc1c6e63d3d835c824c7a2903
staging/rtl8192e: Remove all strcpy() uses

strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy().

It is also dangerous a strcpy() followed by a strcat(). In this case,
refactor the code using scnprintf() and avoid this combination.

Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210723173216.12157-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_softmac_wx.c