mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-27 12:15:34 +03:00
fix output bug reported by Petr Pajas and analyzed by Bill Daniel
* xmlIO.c: fix output bug reported by Petr Pajas and analyzed by Bill Daniel svn path=/trunk/; revision=3695
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Sat Feb 16 11:06:54 CET 2008 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xmlIO.c: fix output bug reported by Petr Pajas and analyzed by
|
||||||
|
Bill
|
||||||
|
|
||||||
Fri Feb 15 09:32:11 CET 2008 Daniel Veillard <daniel@veillard.com>
|
Fri Feb 15 09:32:11 CET 2008 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* include/libxml/xmlerror.h tree.c: patch from Julien Charbon
|
* include/libxml/xmlerror.h tree.c: patch from Julien Charbon
|
||||||
|
|||||||
11
xmlIO.c
11
xmlIO.c
@@ -3315,6 +3315,16 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
|
|||||||
cons = len;
|
cons = len;
|
||||||
chunk = (out->buffer->size - out->buffer->use) - 1;
|
chunk = (out->buffer->size - out->buffer->use) - 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* make sure we have enough room to save first, if this is
|
||||||
|
* not the case force a flush, but make sure we stay in the loop
|
||||||
|
*/
|
||||||
|
if (chunk < 40) {
|
||||||
|
nbchars = 0;
|
||||||
|
oldwritten = -1;
|
||||||
|
goto flush;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* first handle encoding stuff.
|
* first handle encoding stuff.
|
||||||
*/
|
*/
|
||||||
@@ -3360,6 +3370,7 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
|
|||||||
if ((nbchars < MINLEN) && (len <= 0))
|
if ((nbchars < MINLEN) && (len <= 0))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
flush:
|
||||||
if (out->writecallback) {
|
if (out->writecallback) {
|
||||||
/*
|
/*
|
||||||
* second write the stuff to the I/O channel
|
* second write the stuff to the I/O channel
|
||||||
|
|||||||
Reference in New Issue
Block a user