summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.cpp
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-07-11 13:43:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-11 13:43:52 +0000
commite7e454da8e382513b9e271bb3e0be3bd901bfbd9 (patch)
treeb74fcf7180ba693b56427d5a338526c47010eb06 /core/fpdfapi/parser/cpdf_parser.cpp
parentb66077d3ef7ba594f2a831840783549f4dd70d86 (diff)
downloadpdfium-e7e454da8e382513b9e271bb3e0be3bd901bfbd9.tar.xz
Do not store cross ref v5 obj within document.
Currently, not necessary to store the cross ref v5 obj within CPDF_IndirectObjectHolder(CPDF_Document), because all necessary data from the cross ref are parsed or cloned, and owned by CPDF_Parser seperately from CPDF_IndirectObjectHolder. Also this fix regression from commit 4ea4459e. BUG=chromium:810768 Change-Id: I0d1a11ff027210f4f15804a69d12416838ec9815 Reviewed-on: https://pdfium-review.googlesource.com/37110 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index e372f1272c..f7846eff31 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -977,16 +977,7 @@ bool CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, bool bMainXRef) {
if (!objnum)
return false;
- CPDF_Object* pUnownedObject = pObject.get();
- const CPDF_Dictionary* pRootDict = GetRoot();
- if (pRootDict && pRootDict->GetObjNum() == objnum)
- return false;
- if (!m_pObjectsHolder->ReplaceIndirectObjectIfHigherGeneration(
- objnum, std::move(pObject))) {
- return false;
- }
-
- CPDF_Stream* pStream = pUnownedObject->AsStream();
+ CPDF_Stream* pStream = pObject->AsStream();
if (!pStream)
return false;