From 64e217e97ced9315d0a394576d95182d4634e770 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Mon, 5 Nov 2018 16:24:23 +0900 Subject: [PATCH] [WIN32SS][FONT] Fix regression of #1004 (#1012) Signed-off-by: Doug Lyons CORE-15333 --- 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 ee242a39ced..ce655c5d3e0 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -1053,7 +1053,8 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont, return 0; /* failure */ } - IntUnicodeStringToBuffer(FontGDI->Filename, sizeof(FontGDI->Filename), pFileName); + RtlCopyMemory(FontGDI->Filename, pFileName->Buffer, pFileName->Length); + FontGDI->Filename[pFileName->Length / sizeof(WCHAR)] = UNICODE_NULL; } else {