X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmUtil.cxx;h=df94971e5654fb511429dfb73580f21d1b31c0fd;hb=d7531a8099267279c067b9115309cdc10f8eb46d;hp=7ac1484ca0683a69fb55e8ddd6c3425a4d8bffcb;hpb=df5a10107db5596ce0ce2089dc48d781956bdbfe;p=gdcm.git diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 7ac1484c..df94971e 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/10/27 17:04:36 $ - Version: $Revision: 1.170 $ + Date: $Date: 2005/11/22 20:30:46 $ + Version: $Revision: 1.176 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,6 +19,7 @@ #include "gdcmUtil.h" #include "gdcmDebug.h" #include +#include // for va_list // For GetCurrentDate, GetCurrentTime #include @@ -110,7 +111,7 @@ std::string Util::GDCM_MAC_ADRESS = GetMACAddress(); /** * \brief Provide a better 'c++' approach for sprintf * For example c code is: - * char result[200]; // hope 200 is enough + * char result[2048]; // hope 2048 is enough * sprintf(result, "%04x|%04x", group , elem); * * c++ code is @@ -126,7 +127,7 @@ std::string Util::GDCM_MAC_ADRESS = GetMACAddress(); */ std::string Util::Format(const char *format, ...) { - char buffer[2048]; + char buffer[2048]; // hope 2048 is enough va_list args; va_start(args, format); vsprintf(buffer, format, args); //might be a security flaw @@ -192,10 +193,9 @@ int Util::CountSubstring (const std::string &str, */ bool Util::IsCleanString(std::string const &s) { - std::cout<< std::endl << s << std::endl; + //std::cout<< std::endl << s << std::endl; for(unsigned int i=0; i(val), len); }