mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
754e335704
commit
2e63c495f5
+1
-1
@@ -1974,7 +1974,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);
|
||||
|
||||
Reference in New Issue
Block a user