Bernhard Übelacker : gdi32: Avoid crash by initializing variable font_set.
Module: wine Branch: master Commit: 79d8ed4849c1fdc2d8a9e67e41d389ef0c227bac URL: https://source.winehq.org/git/wine.git/?a=commit;h=79d8ed4849c1fdc2d8a9e67e4... Author: Bernhard Übelacker <bernhardu(a)mailbox.org> Date: Tue Nov 24 13:54:21 2020 +0100 gdi32: Avoid crash by initializing variable font_set. If the call pFcStrListNext returns NULL the loop is never entered and the variable font_set never gets written, leading to a crash cleaning up font_set by pFcFontSetDestroy. Signed-off-by: Bernhard Übelacker <bernhardu(a)mailbox.org> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 993110e6fe0..e7684728c9c 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1468,7 +1468,7 @@ static void init_fontconfig(void) static void fontconfig_add_fonts_from_dir_list( FcConfig *config, FcStrList *dir_list, FcStrSet *done_set, DWORD flags ) { const FcChar8 *dir; - FcFontSet *font_set; + FcFontSet *font_set = NULL; FcStrList *subdir_list = NULL; FcStrSet *subdir_set = NULL; FcCache *cache = NULL;
participants (1)
-
Alexandre Julliard