Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

Issue 1521543002: Fix a regression for parsing '/' - commit a568ff2d was too strict. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index bc5d3edc2bbc6bcacd66680a15110eaf64899e14..ca3a5f67a24811dacd0f0b10a426d164f7f7f4d7 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698