From 7b8cd8dafb4bdd98874ec4716d7e8e049a596e11 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 27 Apr 2018 20:11:18 +0000 Subject: Provide double-byte terminator in Windows font variant name. When parsing UTF16-LE, the default trailing "\0" from a single-byte character literal isn't suffucient. TBR=dsinclair@chromium.org Bug: 835184 Change-Id: Ie7db53262adbec0ebccb5d0b22752b8c9f5e6229 Reviewed-on: https://pdfium-review.googlesource.com/31191 Reviewed-by: dsinclair Commit-Queue: Tom Sepez (cherry picked from commit 9f71afb882a9d1294f8a4392b8553e2c285f51c7) Reviewed-on: https://pdfium-review.googlesource.com/31630 Reviewed-by: Tom Sepez --- core/fxge/win32/fx_win32_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 337f9643d1..4047866412 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -38,9 +38,9 @@ namespace { const struct { const char* m_pFaceName; - const char* m_pVariantName; + const char* m_pVariantName; // Note: UTF16-LE terminator required. } g_VariantNames[] = { - {"DFKai-SB", "\x19\x6A\x77\x69\xD4\x9A"}, + {"DFKai-SB", "\x19\x6A\x77\x69\xD4\x9A\x00\x00"}, }; const struct { -- cgit v1.2.3