]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSensorTemp.cxx
coverity fix
[u/mrichter/AliRoot.git] / TPC / AliTPCSensorTemp.cxx
index 571d391c8a4d81e5a1abe107ddbc8495600dceaf..a634d439e5bd0177c42144908490f71313b6cc14 100644 (file)
@@ -34,7 +34,7 @@
 
 //
 
-
+#include <strings.h>
 #include "AliTPCSensorTemp.h"
 ClassImp(AliTPCSensorTemp)
 
@@ -329,13 +329,14 @@ TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree,
       temp->SetZ(-240);
       }
 
-    if(temp->GetType()==5 && temp->GetSide()==0) {
+    if ( num < (Int_t)(sizeof(kTSz)/sizeof(kTSz[0]))) {
+      if(temp->GetType()==5 && temp->GetSide()==0) {
          temp->SetZ(kTSz[num]);
       }
-    if(temp->GetType()==5 && temp->GetSide()==1) {
+      if(temp->GetType()==5 && temp->GetSide()==1) {
          temp->SetZ(-kTSz[num]);
       }
-
+    }
 
   }
   return array;