diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-26 15:31:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-26 15:31:54 +0400 |
commit | 1a3c59baacf9caecb4b13bbe2bb6316ef115f19e (patch) | |
tree | 4c3b622f138174760f4b4e3631e12ebe4dffbdad /source/blender/modifiers/intern/MOD_solidify.c | |
parent | 0d488c5580502575d2a1c24465aa3eaa4ad49cfc (diff) |
fix for out of bounds memory access in solidify modifier (hidden by guardedalloc).
Diffstat (limited to 'source/blender/modifiers/intern/MOD_solidify.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 9cdd52f2375..5eebb9ca52a 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -302,10 +302,11 @@ static DerivedMesh *applyModifier( ml = orig_mloop + mp->loopstart; - for (j = 0, ml_v1 = ml->v, ml_v2 = ml[mp->totloop - 1].v; + for (j = 0, ml_v2 = ml[mp->totloop - 1].v; j < mp->totloop; - j++, ml++, ml_v2 = ml_v1, ml_v1 = ml->v) + j++, ml++, ml_v2 = ml_v1) { + ml_v1 = ml->v; /* add edge user */ eidx = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edgehash, ml_v1, ml_v2)); if (edge_users[eidx] == INVALID_UNUSED) { |