]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TTherminator/Therminator/Parser.cxx
Fix Coverity
[u/mrichter/AliRoot.git] / TTherminator / Therminator / Parser.cxx
index cc1fdb031722e47f1ef737b52ba93aa05d58f0a2..b3b30ba8ba8bc9120cb436f244c6f0a6a3f3f534 100644 (file)
@@ -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);