Coverity fix.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 17:50:41 +0000 (17:50 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 17:50:41 +0000 (17:50 +0000)
EVGEN/AliGenCorrHF.cxx

index bf7dcc35b1577c99265b1d7fe650d720b317ed0d..d2756101c7fa3025438e049f5a247a89c84883de 100644 (file)
@@ -681,9 +681,9 @@ void AliGenCorrHF::GetHadronPair(TFile* fG, Int_t idq, Double_t y1, Double_t y2,
     char tag[100]; 
     TH2F *h2h[12], *h2s[12], *hProbHH; // hard & soft fragmentation and HH-probability functions
     for (Int_t ipt = 0; ipt<fgnptbins; ipt++) { 
-      sprintf(tag,"h2h_pt%d",ipt); 
+      snprintf(tag,100, "h2h_pt%d",ipt); 
       h2h[ipt] = (TH2F*) fG->Get(tag); 
-      sprintf(tag,"h2s_pt%d",ipt); 
+      snprintf(tag,100, "h2s_pt%d",ipt); 
       h2s[ipt] = (TH2F*) fG->Get(tag); 
     }