summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp5
-rw-r--r--core/fpdfapi/parser/cpdf_linearized_header.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_linearized_header.h6
3 files changed, 8 insertions, 5 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index 91fc8c1087..f066117fe9 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -578,7 +578,8 @@ bool CPDF_DataAvail::CheckHeader() {
bool CPDF_DataAvail::CheckFirstPage() {
if (!m_pLinearized->GetFirstPageEndOffset() ||
- !m_pLinearized->GetFileSize() || !m_pLinearized->GetLastXRefOffset()) {
+ !m_pLinearized->GetFileSize() ||
+ !m_pLinearized->GetMainXRefTableFirstEntryOffset()) {
m_docStatus = PDF_DATAAVAIL_ERROR;
return false;
}
@@ -1167,7 +1168,7 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckLinearizedData() {
if (m_bLinearedDataOK)
return DataAvailable;
ASSERT(m_pLinearized);
- if (!m_pLinearized->GetLastXRefOffset())
+ if (!m_pLinearized->GetMainXRefTableFirstEntryOffset())
return DataError;
if (!m_bMainXRefLoadTried) {
diff --git a/core/fpdfapi/parser/cpdf_linearized_header.cpp b/core/fpdfapi/parser/cpdf_linearized_header.cpp
index 4d0b0e0acc..98cdcc450f 100644
--- a/core/fpdfapi/parser/cpdf_linearized_header.cpp
+++ b/core/fpdfapi/parser/cpdf_linearized_header.cpp
@@ -52,7 +52,7 @@ std::unique_ptr<CPDF_LinearizedHeader> CPDF_LinearizedHeader::CreateForObject(
CPDF_LinearizedHeader::CPDF_LinearizedHeader(const CPDF_Dictionary* pDict) {
m_szFileSize = pDict->GetIntegerFor("L");
m_dwFirstPageNo = pDict->GetIntegerFor("P");
- m_szLastXRefOffset = pDict->GetIntegerFor("T");
+ m_szMainXRefTableFirstEntryOffset = pDict->GetIntegerFor("T");
m_PageCount = pDict->GetIntegerFor("N");
m_szFirstPageEndOffset = pDict->GetIntegerFor("E");
m_FirstPageObjNum = pDict->GetIntegerFor("O");
diff --git a/core/fpdfapi/parser/cpdf_linearized_header.h b/core/fpdfapi/parser/cpdf_linearized_header.h
index 79795b872f..98ae9c650f 100644
--- a/core/fpdfapi/parser/cpdf_linearized_header.h
+++ b/core/fpdfapi/parser/cpdf_linearized_header.h
@@ -25,7 +25,9 @@ class CPDF_LinearizedHeader {
FX_FILESIZE GetFileSize() const { return m_szFileSize; }
uint32_t GetFirstPageNo() const { return m_dwFirstPageNo; }
// Will only return values > 0.
- FX_FILESIZE GetLastXRefOffset() const { return m_szLastXRefOffset; }
+ FX_FILESIZE GetMainXRefTableFirstEntryOffset() const {
+ return m_szMainXRefTableFirstEntryOffset;
+ }
uint32_t GetPageCount() const { return m_PageCount; }
// Will only return values > 0.
FX_FILESIZE GetFirstPageEndOffset() const { return m_szFirstPageEndOffset; }
@@ -43,7 +45,7 @@ class CPDF_LinearizedHeader {
private:
FX_FILESIZE m_szFileSize = 0;
uint32_t m_dwFirstPageNo = 0;
- FX_FILESIZE m_szLastXRefOffset = 0;
+ FX_FILESIZE m_szMainXRefTableFirstEntryOffset = 0;
uint32_t m_PageCount = 0;
FX_FILESIZE m_szFirstPageEndOffset = 0;
uint32_t m_FirstPageObjNum = 0;