Skip to content

Commit

Permalink
Potential mitigation for Indiana Jones (aarch64)
Browse files Browse the repository at this point in the history
Only relevant with new GLideN64
  • Loading branch information
m4xw committed Mar 16, 2019
1 parent 548ea00 commit 07f0915
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ static void set_jump_target(intptr_t addr,uintptr_t target)
u_int *ptr=(u_int *)addr;
intptr_t offset=target-(intptr_t)addr;

if(!ptr) // Indiana Jones is weird
return;

if((*ptr&0xFC000000)==0x14000000) {
assert(offset>=-134217728LL&&offset<134217728LL);
*ptr=(*ptr&0xFC000000)|((offset>>2)&0x3ffffff);
Expand Down

0 comments on commit 07f0915

Please sign in to comment.