-
Notifications
You must be signed in to change notification settings - Fork 682
Closed
Description
Template hb_vector_t::fini () frees its allocated buffer as:
if (arrayZ != static_array)
free (arrayZ);
The condition may hold true even when arrayZ points to a static array, if the struct has been moved in memory, ending up in a crash in free ().
This prevents hb_vector_t from being nested, because a lower level hb_vector_t may be realloc'ed in memory by a higher level hb_vector_t. It may be a limitation of hb_vector_t, but even so an obscure crash is not a kind way to tell a developer about the limitation.
Metadata
Metadata
Assignees
Labels
No labels