mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-24 14:33:31 +00:00
host/mesh: comp pointer check
comp data pointer check before using This is port of d466a807ee20670e90169eb2ad36996210277893
This commit is contained in:
committed by
Krzysztof Kopyściński
parent
53d610b73d
commit
c3a4b94f6f
@@ -328,7 +328,7 @@ int bt_mesh_comp_register(const struct bt_mesh_comp *comp)
|
||||
int err;
|
||||
|
||||
/* There must be at least one element */
|
||||
if (!comp->elem_count) {
|
||||
if (!comp || !comp->elem_count) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user