From 6f6faa4cb4a2be5fc0a30125e44f6dcd74509fd4 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Mon, 21 Jul 2014 17:43:53 +0200 Subject: guard against out-of-bounds jump table targets --- src/qcommon/vm_x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index 3650cc8c..b6fc6a63 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -1088,8 +1088,9 @@ void VM_Compile(vm_t *vm, vmHeader_t *header) // ensure that the optimisation pass knows about all the jump // table targets + pc = -1; // a bogus value to be printed in out-of-bounds error messages for( i = 0; i < vm->numJumpTableTargets; i++ ) { - jused[ *(int *)(vm->jumpTableTargets + ( i * sizeof( int ) ) ) ] = 1; + JUSED( *(int *)(vm->jumpTableTargets + ( i * sizeof( int ) ) ) ); } // Start buffer with x86-VM specific procedures -- cgit