Fix for coverity 24253
authorzampolli <Chiara.Zampolli@cern.ch>
Tue, 13 Jan 2015 18:06:03 +0000 (19:06 +0100)
committerzampolli <Chiara.Zampolli@cern.ch>
Tue, 13 Jan 2015 18:06:03 +0000 (19:06 +0100)
TOF/TOFsim/AliTOFT0.cxx

index 5eb2e9d..f7d1df8 100644 (file)
@@ -513,11 +513,9 @@ 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
-                                      // 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);
+  strncat(outFileName, fHeadersFile, sizeof(fHeadersFile));
 
   if(fT0File.IsNull()) fT0File=outFileName;