Fix input buffer allocation in XML parser (#270)
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
151159a5ea
commit
d545551a60
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ static int make_chars_available (struct ddsrt_xmlp_state *st, size_t nmin)
|
|||
}
|
||||
}
|
||||
/* buffer is owned by caller if fp = NULL, and by us if fp != NULL */
|
||||
if (st->cbufp + st->cbufmax < nmin) {
|
||||
if (st->cbufmax < st->cbufp + nmin) {
|
||||
st->cbufmax = st->cbufp + nmin;
|
||||
st->cbuf = ddsrt_realloc (st->cbuf, st->cbufmax);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue