Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2139)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_hint_tables.h

Issue 2255083004: Add a fuzzer for CPDF_HintTables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Add a fuzzer for CPDF_HintTables. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
index 35fbdcb79bfd2f0dac189689e6e87d3948a65703..cda0925de81cdb2cdb9476716df1f3bc3339c299 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
+++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
@@ -20,7 +20,7 @@ class CPDF_Stream;
class CPDF_HintTables {
public:
CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized);
- ~CPDF_HintTables();
+ virtual ~CPDF_HintTables();
bool GetPagePos(int index,
FX_FILESIZE* szPageStartPos,
@@ -39,12 +39,13 @@ class CPDF_HintTables {
uint32_t GetItemLength(int index, const std::vector<FX_FILESIZE>& szArray);
private:
- int GetEndOfFirstPageOffset() const;
- int GetNumberOfPages() const;
- int GetFirstPageObjectNumber() const;
- int GetFirstPageNumber() const;
- int ReadPrimaryHintStreamOffset() const;
- int ReadPrimaryHintStreamLength() const;
+ // 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;
// Helper for the ReadPrimaryHintStream methods above.
int ReadPrimaryHintStream(int index) const;
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698