[PATCH] gdi32: Avoid dereferencing NULL face file name.

Paul Gofman pgofman at codeweavers.com
Fri Jan 15 04:58:37 CST 2021


It turns out Zebediah has already sent identical patch earlier
(https://source.winehq.org/patches/data/197935), please ignore this one.

On 1/14/21 16:55, Paul Gofman wrote:
> Fixes crash in Shadow Empire during font initialization.
>
> Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
> ---
>  dlls/gdi32/font.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
> index 7f243192cc3..6f50cc92a83 100644
> --- a/dlls/gdi32/font.c
> +++ b/dlls/gdi32/font.c
> @@ -913,7 +913,7 @@ static BOOL insert_face_in_family_list( struct gdi_font_face *face, struct gdi_f
>                     debugstr_w(face->full_name), debugstr_w(family->family_name),
>                     cursor->version, face->version );
>  
> -            if (face->file && !wcsicmp( face->file, cursor->file ))
> +            if (face->file && cursor->file && !wcsicmp( face->file, cursor->file ))
>              {
>                  cursor->refcount++;
>                  TRACE("Font %s already in list, refcount now %d\n",





More information about the wine-devel mailing list