| commit | aac59a0e59052366e260396165a759b5b0e80188 | [log] [tgz] |
|---|---|---|
| author | Nicolas Pena <npm@chromium.org> | Tue Aug 22 11:24:17 2017 -0400 |
| committer | Chromium commit bot <commit-bot@chromium.org> | Tue Aug 22 16:02:46 2017 +0000 |
| tree | b712d2cc56b7df68ea495966bfbe2918d124065b | |
| parent | e6f3fccc1c8c90867e0d779bf26337a0db1b1e90 [diff] |
Check length in CFX_Win32FontInfo::AddInstalledFont This CL is a tentative fix for the bug below. The last method in the stack trace is FontEnumProc, which calls AddInstalledFont. This problem was introduced by https://pdfium-review.googlesource.com/c/pdfium/+/10651 Bug: chromium:757388 Change-Id: If089a43367f1106a79276f6b09b6d0546b863e35 Reviewed-on: https://pdfium-review.googlesource.com/11611 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 101c945..5f778f8 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp
@@ -430,7 +430,7 @@ void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, uint32_t FontType) { CFX_ByteString name(plf->lfFaceName); - if (name[0] == '@') + if (name.GetLength() > 0 && name[0] == '@') return; if (name == m_LastFamily) {