Skip to content

Commit b1f2eb0

Browse files
committed
fixed condition for x64 rel jump
1 parent 5de4352 commit b1f2eb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/common/arch/x86.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ generate_hook_payload(lm_address_t from, lm_address_t to, lm_size_t bits, lm_byt
2424

2525
relative_addr = to - from - sizeof(jump32);
2626

27-
if (bits == 64 && ((int64_t)relative_addr < (int64_t)0xFFFFFFFF00000000) || (int64_t)relative_addr > (int64_t)0x7FFFFFFF) {
27+
if (bits == 64 && ((int64_t)relative_addr < (int64_t)0xFFFFFFFF80000000) || (int64_t)relative_addr > (int64_t)0x7FFFFFFF) {
2828
size = sizeof(jump64);
2929
payload = (lm_byte_t *)jump64;
3030
*(uint64_t *)(&jump64[6]) = (uint64_t)to;

0 commit comments

Comments
 (0)