iqiyi / xHook

🔥 A PLT hook library for Android native ELF.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

old_func in xhook_register is not return address value.

whochi opened this issue · comments

The old_func value is returned only null within xhook_register, but it seems to be related to the syntax below.
I think it needs to be modified as below, so please check if it is correct.

Line 478 in the xh_elf_replace_function function
if(NULL != old_func) *old_func = old_addr;
This phrase is
if(NULL == old_func) *old_func = old_addr;

Sorry, I missunderstand this code phrase.