1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00

io: Fix "buffer full" error with certain buffer sizes

Remove a useless check in xmlParserInputBufferGrow that could be
triggered after changing xmlBufAvail in c14cac8b.

Fixes #438.
This commit is contained in:
Nick Wellnhofer 2022-11-13 15:08:44 +01:00
parent 0d1765fdb7
commit 22d879bf0a

View File

@ -3230,12 +3230,6 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
if ((len <= MINLEN) && (len != 4))
len = MINLEN;
if (xmlBufAvail(in->buffer) <= 0) {
xmlIOErr(XML_IO_BUFFER_FULL, NULL);
in->error = XML_IO_BUFFER_FULL;
return(-1);
}
if (xmlBufGrow(in->buffer, len + 1) < 0) {
xmlIOErrMemory("growing input buffer");
in->error = XML_ERR_NO_MEMORY;