From: akisiel Date: Fri, 16 Dec 2011 13:58:55 +0000 (+0000) Subject: Fix Coverity X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=f5e2bbd0974f4ce93a2dc9026727f3c54a48eccf;ds=sidebyside Fix Coverity --- diff --git a/TTherminator/Therminator/Parser.cxx b/TTherminator/Therminator/Parser.cxx index b3b30ba8ba8..2c485d7c71b 100644 --- a/TTherminator/Therminator/Parser.cxx +++ b/TTherminator/Therminator/Parser.cxx @@ -310,9 +310,11 @@ void Parser::ReadInput() if (!tThirdComma) exit(0); tRBracket = strchr(tThirdComma,']'); - if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL))) + if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL))) { PRINT_DEBUG_1("Malformed line!: " << str); - + exit(0); + } + char *tFather = new char[tFirstComma-tLBrackert]; strncpy(tFather, tLBrackert+1, tFirstComma-tLBrackert-1); char *tDaughter1 = new char[tSecondComma-tFirstComma];