mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
r=alecf. 39987. occasional crasher in nsMultiMixedConv.cpp stream converter. We now ensure that we don't search for EOL if we've moved beyond the legitimate buf len
This commit is contained in:
parent
3c17fb6537
commit
46aa24a067
@ -440,7 +440,8 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr,
|
||||
PRBool done = PR_FALSE;
|
||||
PRUint8 lineFeedIncrement = 1;
|
||||
|
||||
while ( (newLine = PL_strchr(cursor, LF)) ) {
|
||||
while ( (cursorLen > 0)
|
||||
&& (newLine = PL_strchr(cursor, LF)) ) {
|
||||
// adjust for linefeeds
|
||||
if ( (newLine > cursor) && (newLine[-1] == CR) ) { // CRLF
|
||||
lineFeedIncrement = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user