diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-18 09:03:20 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-04-18 09:03:20 +0200 |
| commit | d84e1f49ce5d9f6a9931f5802ecadd59efb4667e (patch) | |
| tree | af83121f0efac41e9aa2ce46c9624dedc986d800 /src/tools | |
| parent | c4abaf8c8dd752d40026866f7452ea950ba9786b (diff) | |
| download | box64-d84e1f49ce5d9f6a9931f5802ecadd59efb4667e.tar.gz box64-d84e1f49ce5d9f6a9931f5802ecadd59efb4667e.zip | |
Fixed GetNativeFnc
Diffstat (limited to 'src/tools')
| -rwxr-xr-x | src/tools/bridge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/bridge.c b/src/tools/bridge.c index fb349ccf..4bcdee0f 100755 --- a/src/tools/bridge.c +++ b/src/tools/bridge.c @@ -178,8 +178,8 @@ void* GetNativeFnc(uintptr_t fnc) // check if it's an indirect jump #define PK(a) *(uint8_t*)(fnc+a) #define PK32(a) *(uint32_t*)(fnc+a) - if(PK(0)==0xff && PK(1)==0x25) { // absolute jump, maybe the GOT - uintptr_t a1 = (PK32(2)); // need to add a check to see if the address is from the GOT ! + if(PK(0)==0xff && PK(1)==0x25) { // "absolute" jump, maybe the GOT (it's a RIP+relative in fact) + uintptr_t a1 = fnc+6+(PK32(2)); // need to add a check to see if the address is from the GOT ! a1 = *(uintptr_t*)a1; if(a1 && a1>0x10000) { a1 = (uintptr_t)GetNativeFnc(a1); |