aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-17 09:42:05 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-17 09:42:05 +0000
commit1b7ebbe7c9b66e796f2864bab0f4b55c9de1f4f9 (patch)
treefb8264fa76c018e94c9871bfc81ed541be6e9687
parentbe1063ce192df92901f72c426b157d0b82998b7a (diff)
downloadioquake3-aero-1b7ebbe7c9b66e796f2864bab0f4b55c9de1f4f9.tar.gz
ioquake3-aero-1b7ebbe7c9b66e796f2864bab0f4b55c9de1f4f9.zip
* (bug #4282) Fix potential overlap of VM stack and bss sections (Patrick
Baggett) git-svn-id: svn://svn.icculus.org/quake3/trunk@1632 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/qcommon/vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c
index a62377d..5360522 100644
--- a/code/qcommon/vm.c
+++ b/code/qcommon/vm.c
@@ -423,7 +423,8 @@ vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc ) {
// 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;