* (bug #4282) Fix potential overlap of VM stack and bss sections (Patrick

Baggett)
This commit is contained in:
Tim Angus 2009-09-17 09:42:05 +00:00
parent 5ffb45c79f
commit cc8990495a

View file

@ -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;