From 1b7ebbe7c9b66e796f2864bab0f4b55c9de1f4f9 Mon Sep 17 00:00:00 2001 From: tma Date: Thu, 17 Sep 2009 09:42:05 +0000 Subject: * (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 --- code/qcommon/vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'code/qcommon') 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; -- cgit v1.2.3