mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
mesh: avoid out of bounds reads
This commit is contained in:
parent
84e4acf20a
commit
927b0d8be6
@ -100,6 +100,7 @@ void mesh_composition_data_iterator_init(mesh_composite_data_iterator_t * it, co
|
||||
}
|
||||
|
||||
bool mesh_composition_data_iterator_has_next_element(mesh_composite_data_iterator_t * it){
|
||||
if ((it->offset + 3) >= it->size) return false;
|
||||
return (it->offset + mesh_composition_data_iterator_element_len(it)) <= it->size;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user