summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/parser/cpdf_linearized_header.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_linearized_header.cpp b/core/fpdfapi/parser/cpdf_linearized_header.cpp
index 994d69f9b6..5032bc3807 100644
--- a/core/fpdfapi/parser/cpdf_linearized_header.cpp
+++ b/core/fpdfapi/parser/cpdf_linearized_header.cpp
@@ -43,6 +43,7 @@ bool IsLinearizedHeaderValid(const CPDF_LinearizedHeader* header,
return header->GetFileSize() == file_size &&
static_cast<int>(header->GetFirstPageNo()) >= 0 &&
header->GetFirstPageNo() < kMaxInt &&
+ header->GetFirstPageNo() < header->GetPageCount() &&
header->GetMainXRefTableFirstEntryOffset() < file_size &&
header->GetPageCount() > 0 &&
header->GetFirstPageEndOffset() < file_size &&