Commit: e529882be0752cdfd4fcf2f6b6bc06bcb44947af
Author: Antony Riakiotakis
Date:   Fri May 22 16:59:01 2015 +0200
Branches: master
https://developer.blender.org/rBe529882be0752cdfd4fcf2f6b6bc06bcb44947af

Fix second crashing part of T44497, out of bounds access to hook
modifier data.

Unfortunately seems like we also lose the hook mapping by doing this,
but this can be fixed later and is probably a separate issue.

===================================================================

M       source/blender/editors/curve/editcurve.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve.c 
b/source/blender/editors/curve/editcurve.c
index f50eee7..d4fb3d4 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1188,7 +1188,7 @@ static int *initialize_index_map(Object *obedit, int 
*r_old_totvert)
 
                        while (a--) {
                                keyIndex = getCVKeyIndex(editnurb, bezt);
-                               if (keyIndex) {
+                               if (keyIndex && keyIndex->vertex_index * 3 < 
old_totvert) {
                                        if (keyIndex->switched) {
                                                
old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
                                                
old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to