Coverity fix.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 08:25:18 +0000 (08:25 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 08:25:18 +0000 (08:25 +0000)
MONITOR/root2date.cxx

index 06b9e85..d76df96 100644 (file)
@@ -51,7 +51,7 @@ int Root2Date(AliRawVEvent *gdcRootEvent, unsigned char *gdcDateEvent, char *ddl
      Int_t ddlIndex;
      Int_t detId = AliDAQ::DetectorIDFromDdlID(aliEquipmentHeader->GetId(),ddlIndex);
      char ddlFileName[256];
-     sprintf(ddlFileName,"%s/%s",ddlDir,AliDAQ::DdlFileName(detId,ddlIndex));
+     snprintf(ddlFileName,sizeof(ddlFileName),"%s/%s",ddlDir,AliDAQ::DdlFileName(detId,ddlIndex));
      FILE *ddlFile;
      if((ddlFile=fopen(ddlFileName, "wb"))) {
        fwrite(p, chunkSize, 1, ddlFile);