Commit ff76eb28 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Clear up a potential NULL dereference

if ctxt->node_seq.buffer is null then ctxt->node_seq.maximum ought
to be zero but it's better to clarify the check in the code directly.
parent a885f13a
......@@ -1990,7 +1990,8 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
/* Otherwise, we need to add new node to buffer */
else {
if (ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) {
if ((ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) ||
(ctxt->node_seq.buffer == NULL)) {
xmlParserNodeInfo *tmp_buffer;
unsigned int byte_size;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment