Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 13:54:38 +0000 (13:54 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 13:54:38 +0000 (13:54 +0000)
TTherminator/Therminator/Parser.cxx

index 6c4d5d3..cc1fdb0 100644 (file)
@@ -303,8 +303,11 @@ void Parser::ReadInput()
          
          tLBrackert = strchr(str,'[');
          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 != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL)))