From a8e1cd8920b9ffe610f3f9190a2893d5f1e317f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 18 Nov 2008 19:59:50 +0000 Subject: [PATCH] Buffer overrun: Fixed a segmentation fault --- CheckBufferOverrun.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CheckBufferOverrun.cpp b/CheckBufferOverrun.cpp index 48625d624..ebd8b0f02 100644 --- a/CheckBufferOverrun.cpp +++ b/CheckBufferOverrun.cpp @@ -460,7 +460,10 @@ void CheckBufferOverrunClass::CheckBufferOverrun_StructVariable() } tok3 = tok3->next; - } + } + + if ( ! tok3 ) + break; if ( ! CheckTok ) continue;