1
0
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:
Daniel Veillard
2003-09-17 22:33:22 +00:00
parent ccc4d2b62e
commit f6bc7c249e
5 changed files with 116 additions and 3 deletions

View File

@ -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;