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

Side by Side Diff: src/sksl/SkSLParser.h

Issue 2459573003: Added skslc parse recursion limit (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/sksl/SkSLParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SKSL_PARSER 8 #ifndef SKSL_PARSER
9 #define SKSL_PARSER 9 #define SKSL_PARSER
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::unique_ptr<ASTExpression> term(); 190 std::unique_ptr<ASTExpression> term();
191 191
192 bool intLiteral(int64_t* dest); 192 bool intLiteral(int64_t* dest);
193 193
194 bool floatLiteral(double* dest); 194 bool floatLiteral(double* dest);
195 195
196 bool boolLiteral(bool* dest); 196 bool boolLiteral(bool* dest);
197 197
198 bool identifier(std::string* dest); 198 bool identifier(std::string* dest);
199 199
200
201 void* fScanner; 200 void* fScanner;
202 YY_BUFFER_STATE fBuffer; 201 YY_BUFFER_STATE fBuffer;
202 // current parse depth, used to enforce a recursion limit to try to keep us from overflowing the
203 // stack on pathological inputs
204 int fDepth = 0;
203 Token fPushback; 205 Token fPushback;
204 SymbolTable& fTypes; 206 SymbolTable& fTypes;
205 ErrorReporter& fErrors; 207 ErrorReporter& fErrors;
208
209 friend class AutoDepth;
206 }; 210 };
207 211
208 } // namespace 212 } // namespace
209 213
210 #endif 214 #endif
OLDNEW
« no previous file with comments | « no previous file | src/sksl/SkSLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698