diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-04-27 20:11:18 +0000 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-06-06 15:11:03 +0000 |
commit | 01027114e3d1a90768db2944a5dc538bfb9f6284 (patch) | |
tree | 4a007b34c8232ff0eae1f4ad5a9c60aab610f34e | |
parent | b2b52f87db5ce57da15c7de32022b6e8d1357726 (diff) |
[Backport] Security Bug 835184
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
Reviewed-on: https://pdfium-review.googlesource.com/31191
Change-Id: If0979d3626e3162de31a5e2b18139c6494945938
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/pdfium/core/fxge/win32/fx_win32_device.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chromium/third_party/pdfium/core/fxge/win32/fx_win32_device.cpp b/chromium/third_party/pdfium/core/fxge/win32/fx_win32_device.cpp index 492b0b57df0..e82c551dc93 100644 --- a/chromium/third_party/pdfium/core/fxge/win32/fx_win32_device.cpp +++ b/chromium/third_party/pdfium/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 { |