diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-07-29 00:50:31 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-21 20:25:02 +0000 |
commit | bde6f35d285b0415cdcaf92e58fbe276bc499255 (patch) | |
tree | fd18921226720692c27ae2539295b6201ed90328 | |
parent | 1eb6cb7b078dc773b4663575432f144d15d0c2e5 (diff) | |
download | pdfium-bde6f35d285b0415cdcaf92e58fbe276bc499255.tar.xz |
Unify cross ref item check.chromium/3193
Change-Id: I7c68d0f5a668019d23bbeebc66373f9b245f91a2
Reviewed-on: https://pdfium-review.googlesource.com/9551
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
-rw-r--r-- | core/fpdfapi/parser/cpdf_data_avail.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp index 8370b8cd5f..0d87543145 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/parser/cpdf_data_avail.cpp @@ -979,22 +979,8 @@ bool CPDF_DataAvail::CheckCrossRef(DownloadHints* pHints) { return true; } - while (1) { - if (!GetNextToken(&token)) { - iSize = static_cast<int32_t>( - m_Pos + 512 > m_dwFileLen ? m_dwFileLen - m_Pos : 512); - pHints->AddSegment(m_Pos, iSize); - m_docStatus = PDF_DATAAVAIL_CROSSREF_ITEM; - return false; - } - - if (token == "trailer") { - m_dwTrailerOffset = m_Pos; - m_docStatus = PDF_DATAAVAIL_TRAILER; - return true; - } - } - return false; + m_docStatus = PDF_DATAAVAIL_CROSSREF_ITEM; + return true; } bool CPDF_DataAvail::CheckTrailerAppend(DownloadHints* pHints) { |