Replaced atoi() with StringToInteger().
This commit is contained in:
@@ -55,7 +55,10 @@ void cHTTPMessage::AddHeader(const AString & a_Key, const AString & a_Value)
|
||||
}
|
||||
else if (Key == "content-length")
|
||||
{
|
||||
m_ContentLength = static_cast<size_t>(atol(m_Headers[Key].c_str()));
|
||||
if (!StringToInteger(m_Headers[Key], m_ContentLength))
|
||||
{
|
||||
m_ContentLength = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user