Crash app when hook function read()
devjava81 opened this issue · 1 comments
devjava81 commented
My hook code:
static ssize_t (*sys_read)(int _fd, void * s, size_t _count); static ssize_t my_read(int _fd, void * s, size_t _count) { if(strstr((char*)s,"equastring")!=NULL){ strcpy(s, newString); } ssize_t ret = sys_read(_fd, s, _count); AKLog("my_read: %s", s); return ret; }
On Load
AKHookFunction(reinterpret_cast<void *>(read), reinterpret_cast<void *>(my_read), reinterpret_cast<void **>(&sys_read));
What wrong ?
hariharan-m commented
Have you solved this?