//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));
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(;;)
{
- tmp = sscanf(pdet,"%s",buff);//read the string from the input string pdet into buff
+ tmp = sscanf(pdet,"%9s",buff);//read the string from the input string pdet into buff
if ( (buff[0] == 0) || (tmp == 0) ) break; //if not read
pdet = strstr(pdet,buff) + strlen(buff);//move the input pointer about number of bytes (letters) read