Closed fh2002 closed 2 years ago
1.0.5
7.1
armeabi-v7a
any
bhook拦截了dlsym函数 FILE new_fopen(const char path, const char* mode){ BYTEHOOK_STACK_SCOPE(); return BYTEHOOK_CALL_PREV(new_fopen, path, mode);; } void new_dlsym(void handle, const char* symbol){ BYTEHOOK_STACK_SCOPE(); void rs = NULL; if(strcmp(__symbol, "fopen") == 0) rs = (void)new_fopen; else rs = BYTEHOOK_CALL_PREV(new_dlsym, handle, symbol); LOGD("dlsym: %s, func:%p", __symbol, rs); return rs; }
如果目标应用通过dlsym来调用fopen的时候会崩溃,我看源码中写有 if (0 == stack->frames_cnt) abort(); // called in a non-hook status? 有啥办法解决吗?
bytehook Version
1.0.5
Android OS Version
7.1
Android ABIs
armeabi-v7a
Device Manufacturers and Models
any
Describe the Bug
bhook拦截了dlsym函数 FILE new_fopen(const char path, const char* mode){ BYTEHOOK_STACK_SCOPE(); return BYTEHOOK_CALL_PREV(new_fopen, path, mode);; } void new_dlsym(void handle, const char* symbol){ BYTEHOOK_STACK_SCOPE(); void rs = NULL; if(strcmp(__symbol, "fopen") == 0) rs = (void)new_fopen; else rs = BYTEHOOK_CALL_PREV(new_dlsym, handle, symbol); LOGD("dlsym: %s, func:%p", __symbol, rs); return rs; }
如果目标应用通过dlsym来调用fopen的时候会崩溃,我看源码中写有 if (0 == stack->frames_cnt) abort(); // called in a non-hook status? 有啥办法解决吗?