Fix for bug 291827 (Expat's byte position is bogus if a chunk boundary falls before we block). r/sr=bz, a=bsmedberg.
git-svn-id: svn://10.0.0.236/trunk@176607 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1568,8 +1568,11 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
|
||||
}
|
||||
/* BEGIN MOZILLA CHANGE (Blocking parser) */
|
||||
else if (errorCode == XML_ERROR_SUSPENDED) {
|
||||
int unparsed = bufferEnd - eventEndPtr;
|
||||
bufferPtr = eventPtr;
|
||||
parseEndPtr = eventEndPtr;
|
||||
bufferEnd -= unparsed; /* Substract what we haven't parsed */
|
||||
parseEndByteIndex -= unparsed;
|
||||
XmlUpdatePosition(encoding, positionPtr, eventEndPtr, &position);
|
||||
return XML_STATUS_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user