diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPResponseListener.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPResponseListener.cpp index b1bcd13f733..91492e8add2 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPResponseListener.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPResponseListener.cpp @@ -130,6 +130,7 @@ nsHTTPResponseListener::OnDataAvailable(nsIChannel* channel, while (NS_SUCCEEDED(rv) && i_Length && !m_bHeadersDone) { rv = ParseHTTPHeader(pBuffer, i_Length, &actualBytesRead); + NS_ASSERTION(i_Length - actualBytesRead <= i_Length, "wrap around"); i_Length -= actualBytesRead; }