From 29041010864c5d9b454ed3739873b2dcccc42767 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 22 Mar 2017 13:40:39 -0400 Subject: Fix ASSERT in CPDF_Data_Avail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña --- core/fpdfapi/parser/cpdf_data_avail.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fpdfapi') 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); } -- cgit v1.2.3