modem: modem_cellular: CID 338073
incorrect size passed to strncpy() Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit is contained in:
parent
08a51bae89
commit
b668296a50
|
@ -301,7 +301,7 @@ static void modem_cellular_chat_on_imei(struct modem_chat *chat, char **argv, ui
|
|||
return;
|
||||
}
|
||||
|
||||
strncpy(data->imei, argv[1], sizeof(data->imei));
|
||||
strncpy(data->imei, argv[1], sizeof(data->imei) - 1);
|
||||
}
|
||||
|
||||
static void modem_cellular_chat_on_cgmm(struct modem_chat *chat, char **argv, uint16_t argc,
|
||||
|
|
Loading…
Reference in a new issue