[fdo-commits] r834 - branches/3.2.x/Utilities/OWS/Src
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Mon Mar 12 11:47:11 EDT 2007
Author: jacklee
Date: 2007-03-12 11:47:11 -0400 (Mon, 12 Mar 2007)
New Revision: 834
Modified:
branches/3.2.x/Utilities/OWS/Src/FdoOwsHttpHandler.cpp
Log:
In FdoOwsHttpHandler::_headerCallback, retCodeStr was not nul terminated.
Modified: branches/3.2.x/Utilities/OWS/Src/FdoOwsHttpHandler.cpp
===================================================================
--- branches/3.2.x/Utilities/OWS/Src/FdoOwsHttpHandler.cpp 2007-03-10 07:09:19 UTC (rev 833)
+++ branches/3.2.x/Utilities/OWS/Src/FdoOwsHttpHandler.cpp 2007-03-12 15:47:11 UTC (rev 834)
@@ -103,10 +103,11 @@
if (len > FdoOwsGlobals::MIN_LEN_HTTP_RESPONSE_FIRST_LINE &&
strncmp((const char*)ptr, FdoOwsGlobals::HTTP_SLASH, sizeof(FdoOwsGlobals::HTTP_SLASH) - 1) == 0)
{
- char retCodeStr[FdoOwsGlobals::LEN_HTTP_RET_CODE];
+ char retCodeStr[FdoOwsGlobals::LEN_HTTP_RET_CODE+1];
strncpy(retCodeStr,
(const char*)ptr + FdoOwsGlobals::MIN_LEN_HTTP_RESPONSE_FIRST_LINE - FdoOwsGlobals::LEN_HTTP_RET_CODE,
FdoOwsGlobals::LEN_HTTP_RET_CODE);
+ retCodeStr[FdoOwsGlobals::LEN_HTTP_RET_CODE] = '\0';
int retCode = atoi(retCodeStr);
if (retCode < FdoOwsGlobals::MIN_HTTP_ERROR_CODE)
m_bValidDocument = true;
More information about the fdo-commits
mailing list