summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_fontmapper.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-08-16 14:27:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-16 19:51:51 +0000
commit59178f5b6e64c6c30545f1fd1ee6974eaa1356fc (patch)
tree165b8fb34ec5ca8c1c9c91cf7eeab922e23244c1 /core/fxge/cfx_fontmapper.cpp
parent5a0214b38862ebb761342cd6708b8afe1192e1b8 (diff)
downloadpdfium-59178f5b6e64c6c30545f1fd1ee6974eaa1356fc.tar.xz
Fix another unguarded string element access
BUG=chromium:754969 Change-Id: I4f92d301499c658c57393fde01f1252ea84e59a8 Reviewed-on: https://pdfium-review.googlesource.com/11250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxge/cfx_fontmapper.cpp')
-rw-r--r--core/fxge/cfx_fontmapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp
index b8ffe047a3..005c61ae8a 100644
--- a/core/fxge/cfx_fontmapper.cpp
+++ b/core/fxge/cfx_fontmapper.cpp
@@ -431,7 +431,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
}
CFX_ByteString SubstName = name;
SubstName.Remove(' ');
- if (bTrueType && name[0] == '@')
+ if (bTrueType && name.GetLength() > 0 && name[0] == '@')
SubstName = name.Right(name.GetLength() - 1);
PDF_GetStandardFontName(&SubstName);
if (SubstName == "Symbol" && !bTrueType) {