iqiyi / xHook

🔥 A PLT hook library for Android native ELF.
Other
4.1k stars 762 forks source link

old_func in xhook_register is not return address value. #75

Closed whochi closed 4 years ago

whochi commented 4 years ago

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;

whochi commented 4 years ago

Sorry, I missunderstand this code phrase.