[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25811] trunk/blender/source/blender/ makesrna/intern/rna_access.c: Fix for memmove error in RNA collecton remove , could crash on

Brecht Van Lommel brecht at blender.org
Thu Jan 7 20:58:20 CET 2010


Revision: 25811
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25811
Author:   blendix
Date:     2010-01-07 20:58:17 +0100 (Thu, 07 Jan 2010)

Log Message:
-----------
Fix for memmove error in RNA collecton remove, could crash on
removing items in some circumstances.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_access.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_access.c	2010-01-07 19:01:43 UTC (rev 25810)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c	2010-01-07 19:58:17 UTC (rev 25811)
@@ -2021,7 +2021,7 @@
 			if(key+1 < len) {
 				/* move element to be removed to the back */
 				memcpy(&tmp, &array[key], sizeof(IDProperty));
-				memmove(array+key, array+key+1, sizeof(IDProperty)*(len-key+1));
+				memmove(array+key, array+key+1, sizeof(IDProperty)*(len-(key+1)));
 				memcpy(&array[len-1], &tmp, sizeof(IDProperty));
 			}
 





More information about the Bf-blender-cvs mailing list