From: Mark Jansen Date: Thu, 15 Mar 2018 18:11:43 +0000 (+0100) Subject: [WIN32K] Do not try to compare a long name against a truncated name. X-Git-Tag: 0.4.9-RC~570 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=428e4617e94e6cca8379c853a8cdea8f9b487dbf;ds=sidebyside [WIN32K] Do not try to compare a long name against a truncated name. This fixes gdiplus_winetest:font crashing. ROSTESTS-154 --- diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index d94af290a18..92ab8b4461f 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -2522,8 +2522,8 @@ GetFontFamilyInfoForList(LPLOGFONTW LogFont, FontFamilyFillInfo(&InfoEntry, NULL, NULL, FontGDI); - if (_wcsicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName) != 0 && - _wcsicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfFullName) != 0) + if (_wcsnicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfLogFont.lfFaceName, RTL_NUMBER_OF(LogFont->lfFaceName)-1) != 0 && + _wcsnicmp(LogFont->lfFaceName, InfoEntry.EnumLogFontEx.elfFullName, RTL_NUMBER_OF(LogFont->lfFaceName)-1) != 0) { continue; }