From: akisiel Date: Fri, 16 Dec 2011 13:53:56 +0000 (+0000) Subject: Fix Coverity X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=37273086d8493b59cd36c3ef9d02d42d453ac363;ds=sidebyside Fix Coverity --- 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);