Fix DLL loader regression
Mike Hearn
mike at navi.cx
Sat Nov 6 07:51:55 CST 2004
Any problem with this one Alexandre?
On Thu, 04 Nov 2004 01:00:37 +0000, Mike Hearn wrote:
> - Always add .dll extension when loading modules
>
>
> Index: loader.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/ntdll/loader.c,v
> retrieving revision 1.78
> diff -u -p -r1.78 loader.c
> --- loader.c 11 Oct 2004 20:59:06 -0000 1.78
> +++ loader.c 4 Nov 2004 00:56:48 -0000
> @@ -1432,12 +1432,18 @@ static NTSTATUS find_dll_file( const WCH
> len = nt_name.Length - 4*sizeof(WCHAR); /* for \??\ prefix */
> if (len >= *size) goto overflow;
> memcpy( filename, nt_name.Buffer + 4, len + sizeof(WCHAR) );
> +
> + /* do we need to add the .dll extension? */
> if (file_part && !strchrW( file_part, '.' ))
> {
> len += sizeof(dllW) - sizeof(WCHAR);
> if (len >= *size) goto overflow;
> strcatW( filename, dllW );
> + RtlFreeUnicodeString( &nt_name );
> + if (!RtlDosPathNameToNtPathName_U( filename, &nt_name, &file_part, NULL ))
> + return STATUS_NO_MEMORY;
> }
> +
> if (!(*pwm = find_fullname_module( filename )))
> {
> attr.Length = sizeof(attr);
More information about the wine-devel
mailing list