Alexandre Julliard : ntdll: Use the correct section start when reading the COR header.
Module: wine Branch: master Commit: 738b6c00a99aa90fbb8895a22b889ea3ac04034a URL: https://gitlab.winehq.org/wine/wine/-/commit/738b6c00a99aa90fbb8895a22b889ea... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 12 14:01:29 2023 +0200 ntdll: Use the correct section start when reading the COR header. --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index f05cd1b4fd9..ce8b3bcba4d 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2286,7 +2286,7 @@ static BOOL get_cor_header( HANDLE file, const SECTION_IMAGE_INFORMATION *info, { if (va < sec[i].VirtualAddress) continue; if (sec[i].Misc.VirtualSize && va - sec[i].VirtualAddress >= sec[i].Misc.VirtualSize) continue; - offset.QuadPart = sec->PointerToRawData + va - sec[i].VirtualAddress; + offset.QuadPart = sec[i].PointerToRawData + va - sec[i].VirtualAddress; if (NtReadFile( file, 0, NULL, NULL, &io, cor, sizeof(*cor), &offset, NULL )) return FALSE; return (io.Information == sizeof(*cor)); }
participants (1)
-
Alexandre Julliard