[Bf-blender-cvs] [53674fb255d] master: Multires: Add missing context initialization

Sergey Sharybin noreply at git.blender.org
Thu Mar 19 10:14:11 CET 2020


Commit: 53674fb255d92da4b18fa844130a58ea9b57ff9d
Author: Sergey Sharybin
Date:   Thu Mar 19 10:08:08 2020 +0100
Branches: master
https://developer.blender.org/rB53674fb255d92da4b18fa844130a58ea9b57ff9d

Multires: Add missing context initialization

Might have caused access to uninitialized memory when foreach()
would have failed for some reason.

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

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

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

diff --git a/source/blender/blenkernel/intern/multires_reshape_smooth.c b/source/blender/blenkernel/intern/multires_reshape_smooth.c
index cbc6d821e26..2f57b5fc569 100644
--- a/source/blender/blenkernel/intern/multires_reshape_smooth.c
+++ b/source/blender/blenkernel/intern/multires_reshape_smooth.c
@@ -374,6 +374,8 @@ static void context_init(MultiresReshapeSmoothContext *reshape_smooth_context,
   reshape_smooth_context->geometry.vertices = NULL;
   reshape_smooth_context->geometry.num_corners = 0;
   reshape_smooth_context->geometry.corners = NULL;
+  reshape_smooth_context->geometry.num_faces = 0;
+  reshape_smooth_context->geometry.faces = NULL;
 
   reshape_smooth_context->reshape_subdiv = NULL;
   reshape_smooth_context->base_surface_grids = NULL;



More information about the Bf-blender-cvs mailing list