From f5e2bbd0974f4ce93a2dc9026727f3c54a48eccf Mon Sep 17 00:00:00 2001 From: akisiel Date: Fri, 16 Dec 2011 13:58:55 +0000 Subject: [PATCH] Fix Coverity --- TTherminator/Therminator/Parser.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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]; -- 2.31.1