mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
guard against out-of-bounds jump table targets
This commit is contained in:
parent
3c52f2dccc
commit
7b866ae96d
1 changed files with 2 additions and 1 deletions
|
@ -1087,8 +1087,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
|
||||
|
|
Loading…
Reference in a new issue