[PATCH] libwine: Collapse relative paths inside config directories.

Alexandre Julliard julliard at winehq.org
Fri Oct 4 15:21:33 CDT 2019


Paul Gofman <gofmanp at gmail.com> writes:

> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
>     The motivation under this patch is fixing the crash in Halo Online which
>     originates from libcef.dll with Wine Staging. The crash scenario is the
>     following.
>
>     A staging patch puts a 'Times New Roman' font replacement to
>     <datadir>/fonts/times.ttf. This is the only relevant difference introduced by
>     Staging. When the font file is found there, gdi32 uses wine_get_data_dir()
>     for a directory prefix to construct font file name. Later libcef.dll works
>     with fonts through dwrite, and somehow gets confused by a "\\..\\" inside the
>     font file name which it gets with IDWriteLocalFontFileLoader_GetFilePathFromKey()
>     from system font file enumerator object.
>
>     A minimally sufficient fix for that is to collapse the font file name in
>     create_local_file_reference() or right in localfontfileloader_GetFilePathFromKey()
>     in dwrite/font.c. But it probably makes sense to have the paths in registry
>     free of spurious "\\..\\" as these values are also exposed to applications.

It should be done in the places that expose the paths to the app, using
existing Win32 APIs like GetFullPathName().

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list