Give the fuzzed Win32 program a chance to display something even

if the diverted function itself causes a crash.
This commit is contained in:
Sam Hocevar
2009-12-07 18:35:45 +00:00
committed by sam
parent 01765e2aef
commit 21d6697bf0
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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
View File
@@ -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();