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:
Thorsten Blum
2025-10-13 12:49:14 +02:00
committed by Felix Fietkau
parent 754e335704
commit 2e63c495f5
+1 -1
View File
@@ -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);