From e91a63c8343611a274eaf89efa994f06ae9efe31 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 15 Aug 2014 18:39:15 +0200 Subject: [PATCH] Resolve CID 1037101. break after loop if tok is null because tok is dereferenced below. Ticket: #6055 --- lib/executionpath.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/executionpath.cpp b/lib/executionpath.cpp index 074fbf273..c91932f13 100644 --- a/lib/executionpath.cpp +++ b/lib/executionpath.cpp @@ -317,6 +317,8 @@ void ExecutionPath::checkScope(const Token *tok, std::list &che if (tok->varId()) ExecutionPath::bailOutVar(checks, tok->varId()); } + if (!tok) + break; } }