[quake3-commits] r1632 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Sep 17 05:42:05 EDT 2009


Author: tma
Date: 2009-09-17 05:42:05 -0400 (Thu, 17 Sep 2009)
New Revision: 1632

Modified:
   trunk/code/qcommon/vm.c
Log:
* (bug #4282) Fix potential overlap of VM stack and bss sections (Patrick
  Baggett)


Modified: trunk/code/qcommon/vm.c
===================================================================
--- trunk/code/qcommon/vm.c	2009-09-16 12:54:12 UTC (rev 1631)
+++ trunk/code/qcommon/vm.c	2009-09-17 09:42:05 UTC (rev 1632)
@@ -423,7 +423,8 @@
 
 	// round up to next power of 2 so all data operations can
 	// be mask protected
-	dataLength = header.h->dataLength + header.h->litLength + header.h->bssLength;
+	dataLength = header.h->dataLength + header.h->litLength +
+		header.h->bssLength + STACK_SIZE;
 	for ( i = 0 ; dataLength > ( 1 << i ) ; i++ ) {
 	}
 	dataLength = 1 << i;



More information about the quake3-commits mailing list