mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-15 02:36:08 -04:00
Fix infinite loop in HttpMime::getNextLine()
But why was it choking on: HTTP/1.0 404 Not Found Access-Control-Allow-Origin: *.crucial.com Cache-Control: no-store, no-cache Content-Language: en-US Content-Type: text/html;charset=UTF-8 Date: Fri, 23 Dec 2016 11:28:22 GMT Expires: now Pragma: no-cache Server: ECD (ewr/15C8) Set-Cookie: JSESSIONID=0000d0F0OOchoWEn8xyaG21biEo:19nqnurjm; Path=/ Set-Cookie: WC_PERSISTENT=hby5DYNlz8je8o%2bXXxNuCfBl74I%3d%0a%3b2016%2d12%2d23+11%3a28%3a22%2e991%5f1482492502991%2d4123891%5f0; Expires=Sun, 22-Jan-17 11:28:23 GMT; Path=/ Set-Cookie: CruUsrType=3; Path=/ Set-Cookie: CruBnr=""; Path=/ Vary: Accept-Encoding Connection: close
This commit is contained in:
@ -211,7 +211,7 @@ bool HttpMime::getNextLine() {
|
||||
|
||||
currentChar = m_mime[++currentPos];
|
||||
}
|
||||
} while (m_currentLineLen && (m_mime[currentPos] == ' ' || m_mime[currentPos] == '\t'));
|
||||
} while (m_currentLineLen && currentPos < m_mimeLen && (m_mime[currentPos] == ' ' || m_mime[currentPos] == '\t'));
|
||||
|
||||
if (m_currentLineLen == 0) {
|
||||
// set to end of mime
|
||||
@ -1671,4 +1671,4 @@ void HttpMime::print(const httpcookie_t &cookie, int count) {
|
||||
logf(LOG_TRACE, "\t\tdomain : %.*s", static_cast<int>(cookie.m_domainLen), cookie.m_domain);
|
||||
logf(LOG_TRACE, "\t\tsecure : %s", cookie.m_secure ? "true" : "false");
|
||||
logf(LOG_TRACE, "\t\thttponly : %s", cookie.m_httpOnly ? "true" : "false");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user