From ebc7695c60fc3e4afbfa6d9db162a71b190bf685 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 11 Dec 2015 19:01:27 -0800 Subject: Fix a regression for parsing '/' - commit a568ff2d was too strict. BUG=pdfium:326 R=dml@google.com Review URL: https://codereview.chromium.org/1521543002 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'core/src') diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index bc5d3edc2b..ca3a5f67a2 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -2125,10 +2125,6 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (key.IsEmpty()) continue; - CFX_ByteStringC keyNoSlash(key.c_str() + 1, key.GetLength() - 1); - if (keyNoSlash.IsEmpty()) - continue; - if (key == FX_BSTRC("/Contents")) dwSignValuePos = m_Pos; @@ -2136,6 +2132,7 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, if (!pObj) continue; + CFX_ByteStringC keyNoSlash(key.c_str() + 1, key.GetLength() - 1); // TODO(thestig): Remove this conditional once CPDF_Dictionary has a // better underlying map implementation. if (nKeys < 32) { -- cgit v1.2.3