mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-23 02:50:08 +03:00
encoding: Fix infinite loop in xmlCharEncInput
Short-lived regression from 95e81a36.
This commit is contained in:
parent
e0dd330b8f
commit
0533daf5d2
@ -2118,8 +2118,8 @@ xmlCharEncInput(xmlParserInputBufferPtr input)
|
||||
avail = xmlBufAvail(out);
|
||||
if (avail > INT_MAX)
|
||||
avail = INT_MAX;
|
||||
if (avail < toconv * 2) {
|
||||
if (xmlBufGrow(out, toconv * 2) < 0) {
|
||||
if (avail < 4096) {
|
||||
if (xmlBufGrow(out, 4096) < 0) {
|
||||
input->error = XML_ERR_NO_MEMORY;
|
||||
return(XML_ENC_ERR_MEMORY);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user