]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TUHKMgen/TUHKMgen.h
Coverity fixes
[u/mrichter/AliRoot.git] / TUHKMgen / TUHKMgen.h
index a6a457cf1ecb6a377a2cb45e79be55b29c8be343..12c23877cd82297cf2707c4bc24254609c821b26 100755 (executable)
@@ -107,8 +107,8 @@ class TUHKMgen : public TGenerator {
                                   // gluons (0: small-angular, 1: wide-angular, 2:collinear) (default: 0).
   
  
-  void SetPDGParticleFile(const Char_t *name)              {strcpy(fParticleFilename, name);}     // Set the filename containing the particle PDG info
-  void SetPDGDecayFile(const Char_t *name)                 {strcpy(fDecayFilename, name);}        // Set the filename containing the PDG decay channels info
+  void SetPDGParticleFile(const Char_t *name)              {if(strlen(name)<255) strncpy(fParticleFilename, name, 256);}     // Set the filename containing the particle PDG info
+  void SetPDGDecayFile(const Char_t *name)                 {if(strlen(name)<255) strncpy(fDecayFilename, name, 256);}        // Set the filename containing the PDG decay channels info
   void SetPDGParticleStable(Int_t pdg, Bool_t value) {                                      // Turn on/off the decay flag for a PDG particle
     fStableFlagPDG[fStableFlagged] = pdg;
     fStableFlagStatus[fStableFlagged++] = value;