[Bf-blender-cvs] [c0beeeb5de0] master: Fix buffer-overflow in lattice deform evaluation

Julian Eisel noreply at git.blender.org
Fri Oct 30 15:00:46 CET 2020


Commit: c0beeeb5de0cbc6abd7645a15c1dd15428933ff3
Author: Julian Eisel
Date:   Fri Oct 30 14:56:32 2020 +0100
Branches: master
https://developer.blender.org/rBc0beeeb5de0cbc6abd7645a15c1dd15428933ff3

Fix buffer-overflow in lattice deform evaluation

Caused Victor.blend from the cloud to crash with ASan. Four floats are
fetched from the stack, but the buffer was only three wide.

Caused by 042143440d. Issue was probably harmless since the fourth
element wasn't actually touched.

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

M	source/blender/blenkernel/intern/lattice_deform.c

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

diff --git a/source/blender/blenkernel/intern/lattice_deform.c b/source/blender/blenkernel/intern/lattice_deform.c
index 43965813b84..ee69aaea815 100644
--- a/source/blender/blenkernel/intern/lattice_deform.c
+++ b/source/blender/blenkernel/intern/lattice_deform.c
@@ -169,7 +169,7 @@ void BKE_lattice_deform_data_eval_co(LatticeDeformData *lattice_deform_data,
   int ui, vi, wi, uu, vv, ww;
 
   /* vgroup influence */
-  float co_prev[3], weight_blend = 0.0f;
+  float co_prev[4] = {0}, weight_blend = 0.0f;
   copy_v3_v3(co_prev, co);
 #ifdef __SSE2__
   __m128 co_vec = _mm_loadu_ps(co_prev);



More information about the Bf-blender-cvs mailing list