mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* CMD_SIGN_DATA null check
This commit is contained in:
parent
6056c303c1
commit
31f8576640
1 changed files with 1 additions and 1 deletions
|
|
@ -1282,7 +1282,7 @@ public:
|
|||
sign_data = (uint8_t *) malloc(MAX_SIGN_DATA_LEN);
|
||||
sign_data_len = 0;
|
||||
} else if (cmd_frame[0] == CMD_SIGN_DATA && len > 1) {
|
||||
if (sign_data_len + (len - 1) > MAX_SIGN_DATA_LEN) {
|
||||
if (sign_data == NULL || sign_data_len + (len - 1) > MAX_SIGN_DATA_LEN) {
|
||||
writeErrFrame(); // error: too long
|
||||
} else {
|
||||
memcpy(&sign_data[sign_data_len], &cmd_frame[1], len - 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue