summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-08-31 16:53:09 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-09-05 16:56:47 +0000
commit1ad67cfe58963c29762dc28676bdca2afba803a4 (patch)
tree2152b696b72d0b69c9712549110e787e220fc01b /core
parent0e3a4ffcd73dab2a7d5534b7b97cb5e0a0a2edf9 (diff)
downloadpdfium-1ad67cfe58963c29762dc28676bdca2afba803a4.tar.xz
Remove redundant code.
Do not check recursive parsing of same object in CPDF_SyntaxParser, because this problem is solved in CPDF_IndirectObjectHolder. (See https://pdfium-review.googlesource.com/c/pdfium/+/12590) Change-Id: I7829e06ae5eb06e85a0c8cfe22c1c428b55bb692 Reviewed-on: https://pdfium-review.googlesource.com/12610 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 73932494c0..c3ebbdaee9 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -592,14 +592,8 @@ std::unique_ptr<CPDF_Stream> CPDF_SyntaxParser::ReadStream(
std::unique_ptr<CPDF_Dictionary> pDict,
uint32_t objnum,
uint32_t gennum) {
- CPDF_Object* pLenObj = pDict->GetObjectFor("Length");
- FX_FILESIZE len = -1;
- CPDF_Reference* pLenObjRef = ToReference(pLenObj);
-
- bool differingObjNum = !pLenObjRef || (pLenObjRef->GetObjList() &&
- pLenObjRef->GetRefObjNum() != objnum);
- if (pLenObj && differingObjNum)
- len = pLenObj->GetInteger();
+ const CPDF_Number* pLenObj = ToNumber(pDict->GetDirectObjectFor("Length"));
+ FX_FILESIZE len = pLenObj ? pLenObj->GetInteger() : -1;
// Locate the start of stream.
ToNextLine();