wifi: mt76: connac: Replace memcpy + hard-coded size with strscpy
Subsystems (2)
PATCH 1/1 wifi: mt76: connac: Replace memcpy + hard-coded size with strscpy
Replace memcpy() and the hard-coded string length with strscpy() to safely copy the string and improve mt76_connac_mcu_chip_config().
No functional changes.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +1 -1
@@ -1949,7 +1949,7 @@ int mt76_connac_mcu_chip_config(struct mt76_dev *dev) .resp_type = 0, }; -memcpy (req.data,"assert" ,7 ); +strscpy (req.data,"assert" );return mt76_mcu_send_msg (dev,MCU_CE_CMD (CHIP_CONFIG ), &req,sizeof (req), false);
Signature · 1 line
2.51.0