diff --git a/CREDITS.TXT b/CREDITS.TXT index a1226767..275b5f0a 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -3,6 +3,9 @@ The following individuals have helped identify specific bugs and improvements in Detours. The entire Detours community has benefited from their help. ============================================================================== +* Jay Krell: Identified error in DetourFindPayload that caused a + incorrect failure when pcbData is NULL. (Build_342) + * Jay Krell: Identified issue with VirtualSize == 0 files created in NT 3.1 images. (Build_339) diff --git a/src/modules.cpp b/src/modules.cpp index ade78c97..a797121c 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -803,9 +803,9 @@ PVOID WINAPI DetourFindPayload(_In_opt_ HMODULE hModule, if (pcbData) { *pcbData = pSection->cbBytes - sizeof(*pSection); - SetLastError(NO_ERROR); - return (PBYTE)(pSection + 1); } + SetLastError(NO_ERROR); + return (PBYTE)(pSection + 1); } pbData = (PBYTE)pSection + pSection->cbBytes;