[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28464] trunk/blender/intern/guardedalloc/ intern/mallocn.c: fix for allocations over 2gig crashing blender ( even on 64 bit systems)

Campbell Barton ideasman42 at gmail.com
Tue Apr 27 17:46:58 CEST 2010


Revision: 28464
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28464
Author:   campbellbarton
Date:     2010-04-27 17:46:58 +0200 (Tue, 27 Apr 2010)

Log Message:
-----------
fix for allocations over 2gig crashing blender (even on 64 bit systems)
the memheader len would wrap to a negative number and when freeing it would write into the memheader.

Modified Paths:
--------------
    trunk/blender/intern/guardedalloc/intern/mallocn.c

Modified: trunk/blender/intern/guardedalloc/intern/mallocn.c
===================================================================
--- trunk/blender/intern/guardedalloc/intern/mallocn.c	2010-04-27 13:22:43 UTC (rev 28463)
+++ trunk/blender/intern/guardedalloc/intern/mallocn.c	2010-04-27 15:46:58 UTC (rev 28464)
@@ -82,7 +82,7 @@
 	/* note: keep this struct aligned (e.g., irix/gcc) - Hos */
 typedef struct MemHead {
 	int tag1;
-	int len;
+	unsigned int len;
 	struct MemHead *next,*prev;
 	const char * name;
 	const char * nextname;





More information about the Bf-blender-cvs mailing list