summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-03-22 13:40:39 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-22 17:58:14 +0000
commit29041010864c5d9b454ed3739873b2dcccc42767 (patch)
tree2b363ac9b535c4fb3129b37e6a8e6940616a96cb /core
parent5bcd9a32232e8cd5df918104eb131be76f833701 (diff)
downloadpdfium-29041010864c5d9b454ed3739873b2dcccc42767.tar.xz
Fix ASSERT in CPDF_Data_Avail
If ParseIndirectObjectAt fails, the replaced object will be null. So we can't ASSERT the output of ValidatePage. CL introducing the ASSERT: https://codereview.chromium.org/2483633002/ BUG=chromium:702897 Change-Id: Ib6e8c0bccaf2c05893f0abef27d431e112064865 Reviewed-on: https://pdfium-review.googlesource.com/3146 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index 40134a021a..127944037b 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -1625,9 +1625,7 @@ CPDF_Dictionary* CPDF_DataAvail::GetPage(int index) {
m_pDocument->ReplaceIndirectObjectIfHigherGeneration(
dwObjNum, ParseIndirectObjectAt(0, dwObjNum, m_pDocument));
}
- const bool is_page_valid = ValidatePage(index);
- (void)is_page_valid;
- ASSERT(is_page_valid);
+ ValidatePage(index);
return m_pDocument->GetPage(index);
}