]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity Fix
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 15:41:10 +0000 (15:41 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 15:41:10 +0000 (15:41 +0000)
STEER/AliDetector.cxx

index 117f56be98f7812579104ffa2c7f88f9ac29cb81..253e2e05026283bbac683a38e3bb1eb14f332ae6 100644 (file)
@@ -180,7 +180,7 @@ void AliDetector::Browse(TBrowser *b)
   //
   // Insert Detector objects in the list of objects to be browsed
   //
-  char name[64];
+  char name[64]="";
   if( fHits == 0) return;
   TObject *obj;
   Int_t i, nobjects;
@@ -188,7 +188,7 @@ void AliDetector::Browse(TBrowser *b)
   nobjects = fHits->GetEntries();
   for (i=0;i<nobjects;i++) {
     obj = fHits->At(i);
-    sprintf(name,"%s_%d",obj->GetName(),i);
+    snprintf(name,63,"%s_%d",obj->GetName(),i);
     b->Add(obj, &name[0]);
   }
 }