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

Unified Diff: core/fpdfapi/fpdf_parser/include/cpdf_parser.h

Issue 2283893003: Add some limit checks to ReadSharedObjHintTable(). (Closed)
Patch Set: 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 | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/include/cpdf_parser.h
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
index 3d2408fad10046c1a1f827035132a8af0cb6045e..5d6d6f93fc304369a0d331bf26dd440c1a01bf55 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
@@ -34,6 +34,10 @@ class CPDF_Parser {
HANDLER_ERROR
};
+ // A limit on the maximum object number in the xref table. Theoretical limits
+ // are higher, but this may be large enough in practice.
+ static const uint32_t kMaxObjectNumber = 1048576;
+
CPDF_Parser();
~CPDF_Parser();
@@ -170,8 +174,6 @@ class CPDF_Parser {
// All indirect object numbers that are being parsed.
std::set<uint32_t> m_ParsingObjNums;
-
-
};
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_PARSER_H_
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698