Give the fuzzed Win32 program a chance to display something even
if the diverted function itself causes a crash.
This commit is contained in:
@@ -43,8 +43,10 @@ static void insert_func(void *, void *, void *);
|
||||
HINSTANCE (*LoadLibraryA_orig)(LPCSTR);
|
||||
HINSTANCE __stdcall LoadLibraryA_new(LPCSTR path)
|
||||
{
|
||||
void *ret = LoadLibraryA_orig(path);
|
||||
void *ret;
|
||||
fprintf(stderr, "If you see this message, DLL preloading worked\n");
|
||||
ret = LoadLibraryA_orig(path);
|
||||
fprintf(stderr, "If you see this message, function diversion worked\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ int main(void)
|
||||
AllocConsole();
|
||||
|
||||
fprintf(stderr, "About to call LoadLibraryA()\n");
|
||||
LoadLibraryA("whatever");
|
||||
//LoadLibraryA("whatever");
|
||||
fprintf(stderr, "Finished calling LoadLibraryA()\n");
|
||||
|
||||
getchar();
|
||||
|
||||
Reference in New Issue
Block a user