]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveTRDTrackList.h
Coverity
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDTrackList.h
index 09d543790dc05d9949e81f468cbd81da645908b6..e09c3b757d92f4b624cff6d363f31b7c2be7562e 100644 (file)
@@ -1,7 +1,7 @@
-// Author: Benjamin Hess   25/09/2008
+// Author: Benjamin Hess   29/01/2010
 
 /*************************************************************************
- * Copyright (C) 2008, Alexandru Bercuci, Benjamin Hess.                 *
+ * Copyright (C) 2009-2010, Alexandru Bercuci, Benjamin Hess.            *
  * All rights reserved.                                                  *
  *************************************************************************/
 
@@ -18,9 +18,9 @@
 // the list in the same way as for the TEveElementList). In general,    //
 // please use AddMacro(...) for this purpose.                           //
 // Macros that are no longer needed can be removed from the list via    //
-// RemoveSelectedMacros(...).This function takes an iterator of the     //
+// RemoveSelectedMacros(...). This function takes an iterator of the    //
 // list of macros that are to be removed.                               //
-// be removed. An entry looks like:                                     //
+// An entry looks like:                                                 //
 // The data for each macro consists of path, name, type and the command //
 // that will be used to apply the macro. This stuff is stored in a map  //
 // which takes the macro name for the key and the above mentioned data  //
@@ -279,17 +279,17 @@ public:
   void SetCmd(const char* newCmd)             // Sets the command that will be used to call this macro
   { 
     memset(fCmd, '\0', sizeof(Char_t) * MAX_APPLY_COMMAND_LENGTH);
-    sprintf(fCmd, "%s", newCmd);
+    snprintf(fCmd, MAX_APPLY_COMMAND_LENGTH, "%s", newCmd);
   }
   void SetName(const char* newName)           // Sets the macro name (please use without ".C")
   { 
     memset(fName, '\0', sizeof(Char_t) * MAX_MACRO_NAME_LENGTH);
-    sprintf(fName, "%s", newName);
+    snprintf(fName, MAX_MACRO_NAME_LENGTH, "%s", newName);
   }
   void SetPath(const char* newPath)           // Sets the path of the macro
   { 
     memset(fPath, '\0', sizeof(Char_t) * MAX_MACRO_PATH_LENGTH);
-    sprintf(fPath, "%s", newPath);
+    snprintf(fPath, MAX_MACRO_PATH_LENGTH, "%s", newPath);
   }
   void SetSelected(Bool_t selection)          // Sets whether the macro is selected or not
   {