wifi: rtl8xxxu: Use strscpy instead of sprintf
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Thu, 10 Nov 2022 13:59:29 +0000 (15:59 +0200)
committerKalle Valo <kvalo@kernel.org>
Wed, 16 Nov 2022 09:30:43 +0000 (11:30 +0200)
commit9b00565abf3f961b10b2fdf8f762e10ef4cf3acd
tree0a9f5260e5af1dbb908ba55b76f17b5203842a6b
parent486e0315c4a1f4e8ea8da0e7de92d89ee8e1ba0a
wifi: rtl8xxxu: Use strscpy instead of sprintf

Fill priv->chip_name and priv->chip_vendor with strscpy instead of
sprintf. This is just to prevent future bugs in case the name of a
chip/vendor becomes longer than the size of chip_name/chip_vendor.

Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/5fc9cc0e-eecb-8428-aeb1-f745791c0f16@gmail.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c