Hack the standard function in library and call the native library function afterwards

后端 未结 3 1297
谎友^
谎友^ 2021-01-26 01:26

I am trying to hack the malloc function to call my malloc function first.Once my malloc function is executed within that, I want to invoke the standard malloc. But, I am getting

3条回答
  •  孤独总比滥情好
    2021-01-26 02:30

    I cannot see a problem in your code. But why not move malloc_sysm = dlsym(handle_malloc,"malloc"); into your init() function?

提交回复
热议问题