From 37273086d8493b59cd36c3ef9d02d42d453ac363 Mon Sep 17 00:00:00 2001 From: akisiel Date: Fri, 16 Dec 2011 13:53:56 +0000 Subject: [PATCH] Fix Coverity --- TTherminator/Therminator/Parser.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TTherminator/Therminator/Parser.cxx b/TTherminator/Therminator/Parser.cxx index cc1fdb03172..b3b30ba8ba8 100644 --- a/TTherminator/Therminator/Parser.cxx +++ b/TTherminator/Therminator/Parser.cxx @@ -410,9 +410,13 @@ void Parser::ReadInput() char *tLBrackert, *tFirstComma, *tSecondComma, *tThirdComma, *tRBracket; tLBrackert = strchr(str,'['); + if (!tLBrackert) exit(0); tFirstComma = strchr(str,','); + if (!tFirstComma) exit(0); tSecondComma = strchr(tFirstComma+1,','); + if (!tSecondComma) exit(0); tThirdComma = strchr(tSecondComma+1,','); + if (!tThirdComma) exit(0); tRBracket = strchr(tThirdComma,']'); if (!(tLBrackert && tFirstComma && tSecondComma && tThirdComma && tRBracket)) PRINT_DEBUG_1("Malformed line!: " << str); -- 2.31.1