Skip to content
Snippets Groups Projects
Commit 066c6f36 authored by Campbell Barton's avatar Campbell Barton
Browse files

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.
parent f408531b
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment