https://git.reactos.org/?p=reactos.git;a=commitdiff;h=43e208947638c2a3d1cf2…
commit 43e208947638c2a3d1cf2e6ba9d7b1fe39cc83e3
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Dec 11 18:32:39 2018 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Dec 11 18:32:39 2018 +0900
[WIN32SS][FONT] Check NULL of Face->style_name (#1113)
CORE-15433
---
win32ss/gdi/ntgdi/freetype.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index fb823d48d1..744db67cb1 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -1095,7 +1095,8 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont,
Status = RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiString,
TRUE);
if (NT_SUCCESS(Status))
{
- if (Face->style_name[0] && strcmp(Face->style_name,
"Regular"))
+ if (Face->style_name && Face->style_name[0] &&
+ strcmp(Face->style_name, "Regular") != 0)
{
RtlInitAnsiString(&AnsiString, Face->style_name);
Status = RtlAnsiStringToUnicodeString(&Entry->StyleName,
&AnsiString, TRUE);