Alexandre Julliard : kernel32: Return failure in GetBinaryType() for DLL files.

Alexandre Julliard julliard at winehq.org
Tue Apr 6 15:50:12 CDT 2021


Module: wine
Branch: master
Commit: 1e1f110c99fba4c33ebe85bf112c9d37899d3a0c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1e1f110c99fba4c33ebe85bf112c9d37899d3a0c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr  6 12:31:19 2021 +0200

kernel32: Return failure in GetBinaryType() for DLL files.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/module.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 0449bedf83f..2f47423e74b 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -190,6 +190,7 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR name, LPDWORD type )
             status = NtQuerySection( mapping, SectionImageInformation, &info, sizeof(info), NULL );
             CloseHandle( mapping );
             if (status) return FALSE;
+            if (!(info.ImageCharacteristics & IMAGE_FILE_DLL)) return FALSE;
             switch (info.Machine)
             {
             case IMAGE_FILE_MACHINE_I386:




More information about the wine-cvs mailing list