Skip to content

Commit

Permalink
Fixed error in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dnivra committed Nov 23, 2023
1 parent a8a1e25 commit 7affb2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_detourbackend_x86_64.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def test_replace_function_patch_with_function_reference_and_rodata(self):
extern int printf(const char *format, ...);
int multiply(int a, int b){ printf("%sWorld %s %s %s %d\\n", "Hello ", "Hello ", "Hello ", "Hello ", a * b);printf("%sWorld\\n", "Hello "); return a * b; }
'''
self.run_test("replace_function_patch", [ReplaceFunctionPatch(0x4006a2, 0x48, code, symbols={
"add": 0x400660, "subtract": 0x400681})], expected_output=b"-21-21")
self.run_test("replace_function_patch", [ReplaceFunctionPatch(0x4006a2, 0x48, code, symbols={"printf" : 0x400520})],
expected_output=b"Hello World Hello Hello Hello 21\nHello World\n2121")

def test_rip_relative_addressing_insert_code(self):
patch_asm = "sub rax, 10"
Expand Down

0 comments on commit 7affb2d

Please sign in to comment.