Bernhard Übelacker : gdi32: Avoid crash by initializing variable font_set.
Alexandre Julliard
julliard at winehq.org
Tue Nov 24 17:01:43 CST 2020
Module: wine
Branch: master
Commit: 79d8ed4849c1fdc2d8a9e67e41d389ef0c227bac
URL: https://source.winehq.org/git/wine.git/?a=commit;h=79d8ed4849c1fdc2d8a9e67e41d389ef0c227bac
Author: Bernhard Übelacker <bernhardu at 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 at mailbox.org>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list