]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity fixes
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Mar 2011 13:02:27 +0000 (13:02 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Mar 2011 13:02:27 +0000 (13:02 +0000)
STEER/AliRunLoader.cxx

index 3e0f17257a7f1130e6acc91f33258732431c148a..da30a46f9499f0714a035029a1857d7aad24d84c 100644 (file)
@@ -1662,7 +1662,7 @@ AliLoader* AliRunLoader::GetDetectorLoader(const char* detname)
 //run loader object
   
   char loadername[256];
-  sprintf(loadername, "%sLoader", detname);
+  snprintf(loadername, 255, "%sLoader", detname);
   AliLoader* loader = GetLoader(loadername);
   if (!loader) {
     AliError(Form("No loader for %s found", detname));
@@ -1821,8 +1821,8 @@ void AliRunLoader::GetListOfDetectors(const char * namelist,TObjArray& pointerar
   
    char buff[10];
    char dets [200];
-   strcpy(dets,namelist);//compiler cries when char* = const Option_t*;
-   dets[strlen(dets)+1] = '\n';//set endl at the end of string 
+   strncpy(dets,namelist,199);//compiler cries when char* = const Option_t*;
+   //   dets[strlen(dets)+1] = '\n';//set endl at the end of string 
    char* pdet = dets;
    Int_t tmp;
    for(;;)