Fix T53686: VSE Render crash when zooming timeline.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 1 Feb 2018 14:53:49 +0000 (15:53 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 1 Feb 2018 14:55:38 +0000 (15:55 +0100)
Epic fail from recent 'security' fixes (rBe04d7c49dca9). ;)

To be backported to 2.79a!

source/blender/blenkernel/intern/DerivedMesh.c

index 319e0c243de3f6f1d3d4d9141c86f948a2319eff..26aecb526d42e6d6fce1c48aa82ced895a8f1aef 100644 (file)
@@ -1658,7 +1658,7 @@ static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape
                cos = CustomData_get_layer_n(&dm->vertData, CD_SHAPEKEY, i);
                kb->totelem = dm->numVertData;
 
-               kb->data = kbcos = MEM_malloc_arrayN(kb->totelem, sizeof(float), "kbcos DerivedMesh.c");
+               kb->data = kbcos = MEM_malloc_arrayN(kb->totelem, 3 * sizeof(float), "kbcos DerivedMesh.c");
                if (kb->uid == actshape_uid) {
                        MVert *mvert = dm->getVertArray(dm);