mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
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:
committed by
Carles Cufí
parent
73c4d70614
commit
47ea15edcd
@@ -86,7 +86,7 @@ bool __weak shell_mqtt_get_devid(char *id, int 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user