mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Clear up a potential NULL dereference
https://bugzilla.gnome.org/show_bug.cgi?id=705399 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.
This commit is contained in:
@@ -1990,7 +1990,8 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
|
|||||||
|
|
||||||
/* Otherwise, we need to add new node to buffer */
|
/* Otherwise, we need to add new node to buffer */
|
||||||
else {
|
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;
|
xmlParserNodeInfo *tmp_buffer;
|
||||||
unsigned int byte_size;
|
unsigned int byte_size;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user