mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-27 18:50:07 +03:00
SAX2: Fix ctxt->nodemem check
In some error cases and maybe other situations, nodemem can have a value of -1.
This commit is contained in:
parent
73514f2d2e
commit
6dfa68ac7f
2
SAX2.c
2
SAX2.c
@ -2485,7 +2485,7 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
|
||||
(lastChild->type == type) &&
|
||||
(((ctxt->html) && (type != XML_TEXT_NODE)) ||
|
||||
(lastChild->name == xmlStringText));
|
||||
if ((coalesceText) && (ctxt->nodemem != 0)) {
|
||||
if ((coalesceText) && (ctxt->nodemem > 0)) {
|
||||
int maxLength = (ctxt->options & XML_PARSE_HUGE) ?
|
||||
XML_MAX_HUGE_LENGTH :
|
||||
XML_MAX_TEXT_LENGTH;
|
||||
|
Loading…
x
Reference in New Issue
Block a user