Fixing coverity 18573
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 16:47:12 +0000 (16:47 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 16:47:12 +0000 (16:47 +0000)
STEER/STEER/AliModule.cxx

index 481a94c..5294d85 100644 (file)
@@ -198,7 +198,7 @@ void AliModule::AliGetMaterial(Int_t imat, char* name, Float_t &a,
   gMC->GetMaterial(kmat, sname, da, dz, ddens, dradl, dabsl, par);
 
   const char* chname = sname.Data();
-  strcpy(name, chname);
+  strncpy(name, chname, strlen(chname)+1);
   a = da;
   z = dz;
   dens = ddens;