]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverity warnings 15747 15746 15391 15389 fixed
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Mar 2011 22:49:17 +0000 (22:49 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Mar 2011 22:49:17 +0000 (22:49 +0000)
HLT/TPCLib/tracking-ca/AliHLTTPCCAPerformance.cxx

index 91f42c3878cc41ddebc5120e3076cb359990f2a7..2c16a66c1dc59c332d7be7c107d7a1f80739cca4 100644 (file)
@@ -158,6 +158,13 @@ AliHLTTPCCAPerformance::AliHLTTPCCAPerformance()
     fhRefNotRecoNHits( 0 )
 {
   //* constructor
+  for( int i=0; i<4; i++){
+    fhLinkEff[i] = 0;
+    fhLinkAreaY[i] = 0;
+    fhLinkAreaZ[i] = 0;
+    fhLinkChiRight[i] = 0;
+    fhLinkChiWrong[i] = 0;
+  }
 }
 
 
@@ -273,6 +280,13 @@ AliHLTTPCCAPerformance::AliHLTTPCCAPerformance( const AliHLTTPCCAPerformance& )
     fhRefNotRecoNHits( 0 )
 {
   //* dummy
+  for( int i=0; i<4; i++){
+    fhLinkEff[i] = 0;
+    fhLinkAreaY[i] = 0;
+    fhLinkAreaZ[i] = 0;
+    fhLinkChiRight[i] = 0;
+    fhLinkChiWrong[i] = 0;
+  }
 }
 
 const AliHLTTPCCAPerformance &AliHLTTPCCAPerformance::operator=( const AliHLTTPCCAPerformance& ) const
@@ -2111,6 +2125,7 @@ void AliHLTTPCCAPerformance::ReadMCEvent( istream &in )
   }
 
   in >> fNHits;
+  if( fNHits<0 || fNHits>10000000 ) fNHits = 0;
   fHitLabels = new AliHLTTPCCAHitLabel[fNHits];
   for ( int ih = 0; ih < fNHits; ih++ ) {
     AliHLTTPCCAHitLabel &l = fHitLabels[ih];
@@ -2126,6 +2141,9 @@ void AliHLTTPCCAPerformance::ReadMCPoints( istream &in )
   fNMCPoints = 0;
 
   in >> fNMCPoints;
+
+  if( fNMCPoints<0 || fNMCPoints>10000000 ){ fNMCPoints = 0; return; }
+
   fMCPoints = new AliHLTTPCCAMCPoint[fNMCPoints];
   for ( int ip = 0; ip < fNMCPoints; ip++ ) {
     AliHLTTPCCAMCPoint &p = fMCPoints[ip];