From 61f8e9c5aeb0d8cb5477e0248b685214746bada7 Mon Sep 17 00:00:00 2001 From: art-snake Date: Wed, 9 Nov 2016 21:32:46 -0800 Subject: Do not load main cross ref table for first page in linearized pdf. For the first page in linearized PDFs, it is not necessary to load the main xref table, because it have separate special xref table in the file header. This decreasing the time to show first page in PDF plugin. Review-Url: https://codereview.chromium.org/2483633002 --- core/fpdfapi/parser/cpdf_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/parser/cpdf_parser.cpp') diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 2d96834964..c43614f628 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -1557,7 +1557,7 @@ CPDF_Parser::Error CPDF_Parser::LoadLinearizedMainXRefTable() { m_pSyntax->GetNextChar(ch); while (PDFCharIsWhitespace(ch)) { ++dwCount; - if (m_pSyntax->m_FileLen >= + if (m_pSyntax->m_FileLen <= (FX_FILESIZE)(m_pSyntax->SavePos() + m_pSyntax->m_HeaderOffset)) { break; } -- cgit v1.2.3