drivers: modem: hl7800: fix buffer null termination
Fix possibility of no_id_resp_cmd buffer missing a null terminator. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
parent
a7b61fa2a8
commit
f1f309d56b
1 changed files with 1 additions and 1 deletions
|
@ -869,7 +869,7 @@ static int send_at_cmd(struct hl7800_socket *sock, const uint8_t *data,
|
|||
}
|
||||
if (no_id_resp) {
|
||||
strncpy(ictx.no_id_resp_cmd, data,
|
||||
sizeof(ictx.no_id_resp_cmd));
|
||||
sizeof(ictx.no_id_resp_cmd) - 1);
|
||||
ictx.search_no_id_resp = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue