Index: src/sksl/SkSLParser.h |
diff --git a/src/sksl/SkSLParser.h b/src/sksl/SkSLParser.h |
index d1ae0d0e9f5d2f70883f751db151214322edf328..f9dcde244f5b20de3786af812a3ab035c78a8f9e 100644 |
--- a/src/sksl/SkSLParser.h |
+++ b/src/sksl/SkSLParser.h |
@@ -197,12 +197,16 @@ private: |
bool identifier(std::string* dest); |
- |
void* fScanner; |
YY_BUFFER_STATE fBuffer; |
+ // current parse depth, used to enforce a recursion limit to try to keep us from overflowing the |
+ // stack on pathological inputs |
+ int fDepth = 0; |
Token fPushback; |
SymbolTable& fTypes; |
ErrorReporter& fErrors; |
+ |
+ friend class AutoDepth; |
}; |
} // namespace |