isctype assertion failure
2019-03-15 本文已影响0人
玻璃缸里的自游
用withdll在一个进程中注入trcapi32.dll,监控该进程win32api调用情况时,发生了以下错误。

查网络,有一个提及isctype断言失败的。

试一下,居然正解。
说明vs ide默认的c语言的char是signed char的。而detours中的logmessage没有考虑系统的unsigned char的问题。
回看,detours中syelogd.cpp出错的地方是在这里:

问题原因找到了,那就好办了,相比改编译选项影响范围太大来说,直接改出错的源码就好。
如图:在isspace的参数前加上unsigned的强制转换就好。
