modem: modem_cellular: CID 338164
strncpy() passed incorrect size Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit is contained in:
parent
5517e22133
commit
adcdf64a0f
|
@ -337,7 +337,7 @@ static void modem_cellular_chat_on_cgmr(struct modem_chat *chat, char **argv, ui
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(data->fw_version, argv[1], sizeof(data->fw_version));
|
strncpy(data->fw_version, argv[1], sizeof(data->fw_version) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void modem_cellular_chat_on_csq(struct modem_chat *chat, char **argv, uint16_t argc,
|
static void modem_cellular_chat_on_csq(struct modem_chat *chat, char **argv, uint16_t argc,
|
||||||
|
|
Loading…
Reference in a new issue