diff options
author | Nicolas Pena <npm@chromium.org> | 2017-03-22 13:40:39 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-22 17:58:14 +0000 |
commit | 29041010864c5d9b454ed3739873b2dcccc42767 (patch) | |
tree | 2b363ac9b535c4fb3129b37e6a8e6940616a96cb /core/fpdfapi | |
parent | 5bcd9a32232e8cd5df918104eb131be76f833701 (diff) | |
download | pdfium-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/fpdfapi')
-rw-r--r-- | core/fpdfapi/parser/cpdf_data_avail.cpp | 4 |
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); } |