mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
add a Timingtests target to check bad behaviour from the streaming engine
* Makefile.am: add a Timingtests target to check bad behaviour from the streaming engine * dbgen.pl dbgenattr.pl: perl script to generate big instances * xmlreader.c: fix a bad behaviour on large buffer inputs Daniel
This commit is contained in:
@ -803,7 +803,8 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
|
||||
* Discard the consumed input when needed and possible
|
||||
*/
|
||||
if (reader->mode == XML_TEXTREADER_MODE_INTERACTIVE) {
|
||||
if (reader->cur >= 4096) {
|
||||
if ((reader->cur >= 4096) &&
|
||||
(inbuf->use - reader->cur <= CHUNK_SIZE)) {
|
||||
val = xmlBufferShrink(inbuf, reader->cur);
|
||||
if (val >= 0) {
|
||||
reader->cur -= val;
|
||||
|
Reference in New Issue
Block a user