From: Benjamin Shefte support@neuwon.com
Fixes Regression from: Wine 6.21
https://bugs.winehq.org/show_bug.cgi?id=52446
Signed-off-by: Ben Shefte shefben@gmail.com --- dlls/ntdll/loader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 362e1c66be5..ec1fc556250 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -627,8 +627,14 @@ static WCHAR *append_dll_ext( const WCHAR *name ) static BOOL is_import_dll_system( LDR_DATA_TABLE_ENTRY *mod, const IMAGE_IMPORT_DESCRIPTOR *import ) { const char *name = get_rva( mod->DllBase, import->Name ); - - return !strcmp( name, "ntdll.dll" ) || !strcmp( name, "kernel32.dll" ); + WCHAR buffer[16]; + DWORD len = strlen(name); + + if (len * sizeof(WCHAR) >= sizeof(buffer)) + continue; + ascii_to_unicode( buffer, name, len + 1 ); + + return !wcsicmp( buffer, L"ntdll.dll" ) || !wcsicmp( buffer, L"kernel32.dll" ); }
/**********************************************************************
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=105692
Your paranoid android.
=== debian11 (build log) ===
../wine/dlls/ntdll/loader.c:634:9: error: continue statement not within a loop Task: The win32 Wine build failed
=== debian11 (build log) ===
../wine/dlls/ntdll/loader.c:634:9: error: continue statement not within a loop Task: The wow64 Wine build failed