From 2645e967833c7639f6b5afb6dacc27c321b40762 Mon Sep 17 00:00:00 2001 From: Zachary Blair Date: Thu, 3 Jun 2010 22:42:54 -0700 Subject: [PATCH] Applied review suggestions for Ticket #568 --- lib/checkbufferoverrun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 97ce58bb6..77efffa4b 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1528,13 +1528,13 @@ void CheckBufferOverrun::checkInsecureCmdLineArgs() // Jump to the opening curly brace tok = tok->next()->link(); - if (!tok || !tok->next()) + if (!Token::simpleMatch(tok, ") {")) continue; tok = tok->next(); // Search within main() for possible buffer overruns involving argv int indentlevel = -1; - for (; tok && tok->next(); tok = tok->next()) + for (; tok; tok = tok->next()) { if (tok->str() == "{") {