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
git-svn-id: svn://10.0.0.236/trunk@70589 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
54e10440ff
commit
5357b0c6ca
@ -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…
x
Reference in New Issue
Block a user