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 036b293792868bdd29d971e275fcbfc5ffdb6d24..f6e1ee895a91c8946c29ec7d07fb997416defc6e 100644 |
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
@@ -3813,8 +3813,9 @@ int32_t CPDF_DataAvail::CheckCrossRefStream(IFX_DownloadHints* pHints, |
return 0; |
} |
CPDF_Dictionary* pDict = pObj->GetDict(); |
- CPDF_Object* pName = pDict ? pDict->GetElement(FX_BSTRC("Type")) : NULL; |
- if (pName && pName->GetType() == PDFOBJ_NAME) { |
+ CPDF_Name* pName = |
+ ToName(pDict ? pDict->GetElement(FX_BSTRC("Type")) : nullptr); |
+ if (pName) { |
if (pName->GetString() == FX_BSTRC("XRef")) { |
m_Pos += m_parser.m_Syntax.SavePos(); |
xref_offset = pObj->GetDict()->GetInteger(FX_BSTRC("Prev")); |