Wrong use of the function substr
--------------------------------
Key: AXISCPP-1037
URL: https://issues.apache.org/jira/browse/AXISCPP-1037
Project: Axis-C++
Issue Type: Bug
Components: Transport (axis3)
Affects Versions: 1.6 Beta
Reporter: gaolijun
HTTPTransport.cpp
void HTTPTransport::processHTTPHeader()
{
// At this point the HTTP header has been found. It now needs to be processed.
int iPosContentLength = m_strReceived.find( ASCII_S_CONTENT_LENGTH);
if( iPosContentLength != std::string::npos)
{
int iEOL = m_strReceived.find( ASCII_S_LF,
iPosContentLength);
iPosContentLength += strlen( ASCII_S_CONTENT_LENGTH);
m_iContentLength = atoi( m_strReceived.substr(
iPosContentLength, iEOL).c_str());
//Below should be correct.second parameter is the length of the substr.
m_iContentLength = atoi( m_strReceived.substr(
iPosContentLength, iEOL - iPosContentLength).c_str());
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]