Fixing coverity defect 24253
authorzampolli <Chiara.Zampolli@cern.ch>
Thu, 8 Jan 2015 17:05:57 +0000 (18:05 +0100)
committerzampolli <Chiara.Zampolli@cern.ch>
Thu, 8 Jan 2015 17:05:57 +0000 (18:05 +0100)
TOF/TOFsim/AliTOFT0.cxx

index e234e15..5eb2e9d 100644 (file)
@@ -512,7 +512,10 @@ void AliTOFT0::Exec(Option_t *option)
 
   /*const*/ Int_t kSize = 70+fHeadersFile.Length()+1;
   char outFileName[kSize];
-  strncpy(outFileName,"ht010tr120ps",kSize); // global time resolution has to be converted from Int_t to char
+  
+  //strncpy(outFileName,"ht010tr120ps",kSize); // global time resolution has to be converted from Int_t to char
+                                      // in order to have in the output filename this parameter
+  strncpy(outFileName, "ht010tr120ps", sizeof("ht010tr120ps")); // global time resolution has to be converted from Int_t to char
                                       // in order to have in the output filename this parameter
   strncat(outFileName,fHeadersFile,kSize);