mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
Fix for bug 291827 (Expat's byte position is bogus if a chunk boundary falls before we block). r/sr=bz, a=bsmedberg.
This commit is contained in:
parent
ec33a4e38d
commit
0ab59e5717
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user