summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorfoxit <jun_fang@foxitsoftware.com>2014-06-20 17:07:21 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-07-30 17:21:35 -0700
commit8c2842bde4b47fe4ac503817e12a85e2255d5ed5 (patch)
tree7145c45c8870c6b09eae45efdfaf29164fc1e8ed /core
parentdc2576b9ae4cf1caf79e49d5e0b69b9d26e144a6 (diff)
downloadpdfium-8c2842bde4b47fe4ac503817e12a85e2255d5ed5.tar.xz
BUG=382241
R=palmer@chromium.org Review URL: https://codereview.chromium.org/331123002
Diffstat (limited to 'core')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 4bec3337b1..72b8adbe20 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -1464,6 +1464,9 @@ void CPDF_TrueTypeFont::LoadGlyphMap()
&& m_pCharNames == NULL) || (m_Flags & PDFFONT_NONSYMBOLIC)) {
if (!FXFT_Has_Glyph_Names(m_Font.m_Face) && (!m_Font.m_Face->num_charmaps || !m_Font.m_Face->charmaps)) {
int nStartChar = m_pFontDict->GetInteger(FX_BSTRC("FirstChar"));
+ if(nStartChar < 0 || nStartChar > 255)
+ return;
+
int charcode = 0;
for (; charcode < nStartChar; charcode ++) {
m_GlyphIndex[charcode] = 0;