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 3ab44231721195b40e94339bd16a444776dbb23a..e2dab16a9c6e5e45b06aa845ea8101b87ccd94d5 100644 |
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
@@ -2163,7 +2163,9 @@ CPDF_Object* CPDF_SyntaxParser::GetObject(CPDF_IndirectObjects* pObjList, |
pDict->SetAt(keyNoSlash, pObj); |
} |
- if (IsSignatureDict(pDict.get())) { |
+ // Only when this is a signature dictionary and has contents, we reset the |
+ // contents to the un-decrypted form. |
+ if (IsSignatureDict(pDict.get()) && dwSignValuePos) { |
Lei Zhang
2016/01/11 19:55:02
If |dwSignValuePos| is non-zero, but still invalid
Wei Li
2016/01/11 21:07:20
Infinite loops caused during parsing should repeat
|
FX_FILESIZE dwSavePos = m_Pos; |
Lei Zhang
2016/01/11 19:55:02
Replace with CFX_AutoRestorer while we are here?
Wei Li
2016/01/11 21:07:20
Done.
|
m_Pos = dwSignValuePos; |
CPDF_Object* pObj = GetObject(pObjList, objnum, gennum, nullptr, FALSE); |