mwifiex: Ensure the version string from the firmware is 0-terminated
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 3 Nov 2021 20:18:00 +0000 (21:18 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 26 Nov 2021 16:29:38 +0000 (18:29 +0200)
commitdeb573f1d7ddd182ef1792c71d62883d0f833f17
tree84e33ae98c8456ff5573bba44b45c8de91ea792b
parent939b571a3b62b64cf407fa5dbc3941bc87e0ba3b
mwifiex: Ensure the version string from the firmware is 0-terminated

We assume at a few places that priv->version_str is 0-terminated, but
right now we trust the firmware that this is the case with the version
string we get from it.

Let's rather ensure this ourselves and replace the last character with
'\0'.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211103201800.13531-4-verdre@v0yd.nl
drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c