Fix UBSAN warning caused by uninitialized memory use
Unwrapping warned that a non 0/1 boolean value was being set. Initialize all members of PVert since they would be accessed when duplicating a PVert causing the uninitialized memory to be read.
This commit is contained in:
@@ -730,6 +730,10 @@ static PVert *p_vert_add(
|
||||
v->edge = e;
|
||||
v->flag = 0;
|
||||
|
||||
/* Unused, prevent uninitialized memory access on duplication. */
|
||||
v->on_boundary_flag = false;
|
||||
v->slim_id = 0;
|
||||
|
||||
phash_insert(handle->hash_verts, (PHashLink *)v);
|
||||
|
||||
return v;
|
||||
|
||||
Reference in New Issue
Block a user