diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-06-07 17:14:23 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-07 17:14:23 +0000 |
commit | e769ab578af3cf646f6268c992fd9c9dcd494708 (patch) | |
tree | f4bc1c778ff6f34eb7d59e1814c99f8b9ff87a68 /core/fpdfapi/parser/cpdf_hint_tables.h | |
parent | 5ebfd6405fce9bf71f9970431444419e572c2d9f (diff) | |
download | pdfium-e769ab578af3cf646f6268c992fd9c9dcd494708.tar.xz |
Revert "Reland "Simplify CPDF_HintsTable.""
This reverts commit d89f1bf48f017ab9f56df13299f75a906ed33cd0.
Reason for revert:
This CL has introduced at least two CF issues chromium:850407,chromium:850440. Additionally there is a number of changes that remove bounds checks, which I think are suspect.
BUG=chromium:850407,chromium:850440
Original change's description:
> Reland "Simplify CPDF_HintsTable."
>
> This is a reland of 33591752d2cb14f2e07726ca52afce6efbdc07c9
>
> Original change's description:
> > Simplify CPDF_HintsTable.
> >
> > Use CPDF_LinearizedHeader directly.
> >
> > Change-Id: Id12402ef6e6f92fef68d0932df2e1ccb2dcf06aa
> > Reviewed-on: https://pdfium-review.googlesource.com/15770
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Commit-Queue: Lei Zhang <thestig@chromium.org>
>
> Change-Id: I2b5425a6533f4ce237f9ae6c483caa517105a5f7
> Reviewed-on: https://pdfium-review.googlesource.com/34130
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
TBR=thestig@chromium.org,tsepez@chromium.org,art-snake@yandex-team.ru
Change-Id: I463b5b1330f809c2cb508cbf46a804b7a11526e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/34350
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_hint_tables.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_hint_tables.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_hint_tables.h b/core/fpdfapi/parser/cpdf_hint_tables.h index 3664e1517c..d5feb4638c 100644 --- a/core/fpdfapi/parser/cpdf_hint_tables.h +++ b/core/fpdfapi/parser/cpdf_hint_tables.h @@ -38,6 +38,14 @@ class CPDF_HintTables { bool ReadSharedObjHintTable(CFX_BitStream* hStream, uint32_t offset); private: + // Tests can override. + virtual int GetEndOfFirstPageOffset() const; + virtual int GetNumberOfPages() const; + virtual int GetFirstPageObjectNumber() const; + virtual int GetFirstPageNumber() const; + virtual int ReadPrimaryHintStreamOffset() const; + virtual int ReadPrimaryHintStreamLength() const; + uint32_t GetItemLength(uint32_t index, const std::vector<FX_FILESIZE>& szArray) const; |