1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-13 20:58:16 +03:00

Fix an output buffer flushing conversion bug

for https://bugzilla.gnome.org/show_bug.cgi?id=694982
On a flush operation, everything must be converted
This commit is contained in:
Mikhail Titov 2013-03-27 11:00:31 +08:00 committed by Daniel Veillard
parent e1631e1cfc
commit 8e2098aef7

16
xmlIO.c
View File

@ -3725,14 +3725,16 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) {
*/
if ((out->conv != NULL) && (out->encoder != NULL)) {
/*
* convert as much as possible to the parser reading buffer.
* convert as much as possible to the parser output buffer.
*/
nbchars = xmlCharEncOutput(out, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
out->error = XML_IO_ENCODER;
return(-1);
}
do {
nbchars = xmlCharEncOutput(out, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
out->error = XML_IO_ENCODER;
return(-1);
}
} while (nbchars);
}
/*