Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jan 2012 14:08:03 +0000 (14:08 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jan 2012 14:08:03 +0000 (14:08 +0000)
TTherminator/Therminator/Parser.cxx

index 2c485d7..88592cf 100644 (file)
@@ -479,8 +479,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);
          tFourthComma = strchr(tThirdComma+1,',');
          tRBracket = strchr(tThirdComma,']');