Skip to content

Commit

Permalink
fixed x86_32 hook payload
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbo committed Apr 17, 2024
1 parent 8c7e819 commit 8f10855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/arch/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ generate_hook_payload(lm_address_t from, lm_address_t to, lm_size_t bits, lm_byt
*/
snprintf(code, sizeof(code), "jmp [rip]; nop; nop; nop; nop; nop; nop; nop; nop");
} else {
snprintf(code, sizeof(code), "jmp %lx", (unsigned long)to);
snprintf(code, sizeof(code), "jmp 0x%x", (unsigned int)to);
}

size = LM_AssembleEx(code, get_architecture(), bits, from, payload_out);
Expand Down

0 comments on commit 8f10855

Please sign in to comment.