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 7af595de386d62dbbcc0f55c6f35c3764e5b1331..b759cc8a702a6183257ad912412e60b2ec73ec5a 100644 |
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
@@ -4030,14 +4030,14 @@ FX_BOOL CPDF_DataAvail::CheckTrailer(IFX_DownloadHints* pHints) |
CFX_SmartPointer<IFX_FileStream> file(FX_CreateMemoryStream(pBuf, (size_t)iSize, FALSE)); |
m_syntaxParser.InitParser((IFX_FileStream*)file, 0); |
CPDF_Object *pTrailer = m_syntaxParser.GetObject(NULL, 0, 0, 0); |
- if (pTrailer->GetType() != PDFOBJ_DICTIONARY) { |
- return FALSE; |
- } |
if (!pTrailer) { |
m_Pos += m_syntaxParser.SavePos(); |
pHints->AddSegment(m_Pos, iTrailerSize); |
return FALSE; |
} |
+ if (pTrailer->GetType() != PDFOBJ_DICTIONARY) { |
+ return FALSE; |
+ } |
CPDF_Dictionary *pTrailerDict = pTrailer->GetDict(); |
if (pTrailerDict) { |
CPDF_Object *pEncrypt = pTrailerDict->GetElement("Encrypt"); |