diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-08-10 22:11:59 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-14 22:50:59 +0000 |
commit | 5f0e64435c97755a7d309e80ea0a4dad83e76e73 (patch) | |
tree | e27302abac3391dc9ea77cd416eebe580d7f2124 /core/fpdfapi/parser/cpdf_data_avail.h | |
parent | f57cad4f5dd0436d5b207d362afb34fc5f3f9acb (diff) | |
download | pdfium-5f0e64435c97755a7d309e80ea0a4dad83e76e73.tar.xz |
Refactoring of CPDF_DataAvail::GetObject.
Use ReadValidator to request exact data on object read.
Change-Id: I1d1863097fa2b037e1bb2e4e89b93d26c5d8e066
Reviewed-on: https://pdfium-review.googlesource.com/10510
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_data_avail.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_data_avail.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h index b857c659d9..f15f7c0e1d 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.h +++ b/core/fpdfapi/parser/cpdf_data_avail.h @@ -138,13 +138,12 @@ class CPDF_DataAvail final { bool CheckCrossRef(DownloadHints* pHints); bool CheckCrossRefItem(); bool CheckTrailer(DownloadHints* pHints); - bool CheckRoot(DownloadHints* pHints); - bool CheckInfo(DownloadHints* pHints); - bool CheckPages(DownloadHints* pHints); - bool CheckPage(DownloadHints* pHints); + bool CheckRoot(); + bool CheckInfo(); + bool CheckPages(); + bool CheckPage(); bool CheckResources(); - bool CheckAnnots(DownloadHints* pHints); - bool CheckAcroForm(DownloadHints* pHints); + bool CheckAcroForm(); bool CheckAcroFormSubObject(); bool CheckTrailerAppend(DownloadHints* pHints); bool CheckPageStatus(DownloadHints* pHints); @@ -160,7 +159,6 @@ class CPDF_DataAvail final { uint32_t objnum, CPDF_IndirectObjectHolder* pObjList = nullptr); std::unique_ptr<CPDF_Object> GetObject(uint32_t objnum, - DownloadHints* pHints, bool* pExistInFile); bool GetPageKids(CPDF_Parser* pParser, CPDF_Object* pPages); bool PreparePageItem(); @@ -172,20 +170,15 @@ class CPDF_DataAvail final { DocAvailStatus CheckLinearizedFirstPage(uint32_t dwPage); bool CheckPage(uint32_t dwPage, DownloadHints* pHints); - bool LoadDocPages(DownloadHints* pHints); - bool LoadDocPage(uint32_t dwPage, DownloadHints* pHints); + bool LoadDocPages(); + bool LoadDocPage(uint32_t dwPage); bool CheckPageNode(const PageNode& pageNode, int32_t iPage, int32_t& iCount, - DownloadHints* pHints, int level); - bool CheckUnknownPageNode(uint32_t dwPageNo, - PageNode* pPageNode, - DownloadHints* pHints); - bool CheckArrayPageNode(uint32_t dwPageNo, - PageNode* pPageNode, - DownloadHints* pHints); - bool CheckPageCount(DownloadHints* pHints); + bool CheckUnknownPageNode(uint32_t dwPageNo, PageNode* pPageNode); + bool CheckArrayPageNode(uint32_t dwPageNo, PageNode* pPageNode); + bool CheckPageCount(); bool IsFirstCheck(uint32_t dwPage); void ResetFirstCheck(uint32_t dwPage); bool ValidatePage(uint32_t dwPage); |