shell: mqtt: fix call to bin2hex
Fixes: f2affbd973
("os: lib: bin2hex: fix memory overwrite")
Signed-off-by: Yudong Zhang <mtwget@gmail.com>
This commit is contained in:
parent
73c4d70614
commit
47ea15edcd
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ bool __weak shell_mqtt_get_devid(char *id, int id_max_len)
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)memset(id, 0, id_max_len);
|
(void)memset(id, 0, id_max_len);
|
||||||
length = bin2hex(hwinfo_id, (size_t)length, id, id_max_len - 1);
|
length = bin2hex(hwinfo_id, (size_t)length, id, id_max_len);
|
||||||
|
|
||||||
return length > 0;
|
return length > 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue