don't doubly advance...prevent new zip bomb warnings in regression tests for 1.26 release
@@ -352,12 +352,10 @@ public class RecursiveParserWrapper extends ParserDecorator {
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (totalWriteLimit < 0) {
- advance(length);
super.characters(ch, start, length);
return;
}
int availableLength = Math.min(totalWriteLimit - totalChars, length);
- advance(availableLength);
super.characters(ch, start, availableLength);
if (availableLength < length) {
throw new WriteLimitReached();
@@ -367,12 +365,10 @@ public class RecursiveParserWrapper extends ParserDecorator {
@Override
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
if (totalWriteLimit < 0) {
- advance(length);
super.ignorableWhitespace(ch, start, length);
return;
}
int availableLength = Math.min(totalWriteLimit - totalChars, length);
- advance(availableLength);
super.ignorableWhitespace(ch, start, availableLength);
if (availableLength < length) {
throw new WriteLimitReached();
