Blender Git Commit Log

Git Commits -> Revision f75c89b

Revision f75c89b by Bastien Montagne (master)
April 23, 2015, 18:53 (GMT)
Fix T44461: Crash and file corruption after calc_normals_split, calc_tessface execution.

This one was nasty, issue comes with temp/nofree CD layers that get 'removed on the fly'
from saved mesh CDData. Since mesh struct itself was written before that cleanup, it would
still have the old, invalid number of layers. That would lead to a buffer overflow when
loading data later (odd you had to do this twice (i.e. have 2 'ghost' layers) to get the crash).

New code prevents that by always making a copy of the mesh (we were already doing that mostly
anyway, since we were saving without tessfaces), copying (by ref of course) in it cddata,
and then writing mesh struct. Makes code a bit more verbose, but... it works!

Commit Details:

Full Hash: f75c89b3f42ffac51603e6e53459f9d94a8782cc
Parent Commit: 18ee593
Lines Changed: +50, -23

1 Modified Path:

/source/blender/blenloader/intern/writefile.c (+50, -23) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021