From d7c51aa3eb50fd173664b724c1d289f3faf989cd Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 1 Jan 2011 13:49:22 +0000 Subject: Bugfix #25437 Crash in Bezier animation (inserting keys on control points in curve object). The animation rna paths were not fixed after an editmode session, which got fixed 2 weeks ago, but for all older binaries the issue can still pop up. The crash happened because the RNA array-itterator was not doing a boundary check, even whilst the array size was passed on to the itterator callbacks. With rna then writing far outside of valid memory, very bad and unpredictable corruptions happen. I've added a range check now, and a decent print to denote the issue. An assert quit is useless, since a tab-tab on curve objects will fix the channels nicely. Example of warning print: Array itterator out of range: Spline_bezier_points_lookup_int (index 30 range 2) --- source/blender/makesrna/intern/rna_internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesrna/intern/rna_internal.h') diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index cc1771adf8d..90c5a555221 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -324,6 +324,7 @@ typedef struct ArrayIterator { char *endptr; void *free_ptr; /* will be free'd if set */ int itemsize; + int length; IteratorSkipFunc skip; } ArrayIterator; -- cgit v1.2.3