Update of /cvsroot/objecthandler/ObjectHandler/ohxl/Conversions
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31324/ohxl/Conversions
Modified Files:
validations.cpp
Log Message:
fix access violation
Index: validations.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Conversions/validations.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** validations.cpp 16 Nov 2006 12:38:42 -0000 1.1
--- validations.cpp 19 Nov 2006 16:00:34 -0000 1.2
***************
*** 55,59 ****
DLL_API void stringToChar(char *c, const std::string &value) {
! int len = __min(XL_MAX_STR_LEN, value.length());
strncpy(c, value.c_str(), len);
c[len] = 0;
--- 55,59 ----
DLL_API void stringToChar(char *c, const std::string &value) {
! int len = __min(XL_MAX_STR_LEN - 1, value.length());
strncpy(c, value.c_str(), len);
c[len] = 0;
|