diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-05-11 12:31:53 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-05-13 08:26:07 +0000 |
commit | e69d20e10bf040c78a98d42514453d990aa56217 (patch) | |
tree | 34bd19c98a9590d39536e52ae9b6c3c8a95f0a69 /src/libs/3rdparty/cplusplus/Parser.h | |
parent | 71a0d2ddf4b4e5f57806feaaea9c21af115e7183 (diff) |
C++: Limit parsing of initializer clauses
...to prevent out of memory crash for generated tables.
Change-Id: I8f9f51829fcce5bccfe0dba8852023f8dd7d6e37
Task-number: QTCREATORBUG-14390
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Parser.h')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Parser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/Parser.h b/src/libs/3rdparty/cplusplus/Parser.h index 4a2a6dfb7e..7f7f2d28c0 100644 --- a/src/libs/3rdparty/cplusplus/Parser.h +++ b/src/libs/3rdparty/cplusplus/Parser.h @@ -27,6 +27,7 @@ #include "TranslationUnit.h" #include "MemoryPool.h" #include <map> +#include <stack> namespace CPlusPlus { @@ -321,6 +322,7 @@ private: bool _inExpressionStatement: 1; int _expressionDepth; int _statementDepth; + std::stack<int> _initializerClauseDepth; MemoryPool _expressionStatementTempPool; std::map<unsigned, TemplateArgumentListEntry> _templateArgumentList; |