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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_psengine.h

Issue 2350013003: Fix stack exhaustion in CPDF_PSProc::Parse() (Closed)
Patch Set: stray file Created 4 years, 3 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_page/fpdf_page_func.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_psengine.h
diff --git a/core/fpdfapi/fpdf_page/cpdf_psengine.h b/core/fpdfapi/fpdf_page/cpdf_psengine.h
index fc8badbe6d82e552097727e12452c4f1ff380409..c154eb8ac823221fbf4b935bbe3ec6bbf8b66b23 100644
--- a/core/fpdfapi/fpdf_page/cpdf_psengine.h
+++ b/core/fpdfapi/fpdf_page/cpdf_psengine.h
@@ -70,10 +70,11 @@ class CPDF_PSProc {
CPDF_PSProc();
~CPDF_PSProc();
- FX_BOOL Parse(CPDF_SimpleParser* parser);
+ FX_BOOL Parse(CPDF_SimpleParser* parser, int depth);
FX_BOOL Execute(CPDF_PSEngine* pEngine);
private:
+ static const int kMaxDepth = 128;
std::vector<std::unique_ptr<CPDF_PSOP>> m_Operators;
};
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698