--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -591,17 +591,17 @@ nsMultiMixedConv::OnDataAvailable(nsIReq
rv = SendStart(channel);
if (NS_FAILED(rv)) return rv;
}
}
int32_t tokenLinefeed = 1;
while ( (token = FindToken(cursor, bufLen)) ) {
- if (((token + mTokenLen) < (cursor + bufLen)) &&
+ if (((token + mTokenLen + 1) < (cursor + bufLen)) &&
(*(token + mTokenLen + 1) == '-')) {
// This was the last delimiter so we can stop processing
rv = SendData(cursor, LengthToToken(cursor, token));
if (NS_FAILED(rv)) return rv;
if (mPartChannel) {
mPartChannel->SetIsLastPart();
}
return SendStop(NS_OK);