From 39710f106c203394533aa972200d41da4de76329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 25 Apr 2020 10:13:18 +0200 Subject: [PATCH] Fixed #9693 (Bug hunting: Segmentation fault with --bug-hunting and clangimport.cpp) --- lib/exprengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index bb8b5b220..ffacc96ef 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -1491,6 +1491,8 @@ static void execute(const Token *start, const Token *end, Data &data) while (scope->type == Scope::eIf || scope->type == Scope::eElse) scope = scope->nestedIn; tok = scope->bodyEnd; + if (!precedes(tok,end)) + return; } if (Token::simpleMatch(tok, "try"))