ntdll: Try application manifest path when searching for dependent assemblies

Alexandre Julliard julliard at winehq.org
Tue Sep 10 10:10:30 CDT 2013


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -2776,8 +2776,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
>      /* FIXME: add support for language specific lookup */
>  
>      nameW.Buffer = NULL;
> -    if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0,
> -                                    (strlenW(acl->actctx->appdir.info) + 2 * strlenW(ai->name) + 2) * sizeof(WCHAR) + sizeof(dotManifestW) )))
> +    if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR) )))

Please try to allocate the correct size. If you want to use MAX_PATH you
then have to check for overflow when building the string, which is
probably worse.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list