mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Fix pointer dereferenced before null check
for https://bugzilla.gnome.org/show_bug.cgi?id=708364 xmlValidateElementContent is a private function but should still check the ctxt argument before dereferencing
This commit is contained in:
parent
75d13092f2
commit
c570b37972
2
valid.c
2
valid.c
@ -5236,7 +5236,7 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
||||
xmlElementContentPtr cont;
|
||||
const xmlChar *name;
|
||||
|
||||
if ((elemDecl == NULL) || (parent == NULL))
|
||||
if ((elemDecl == NULL) || (parent == NULL) || (ctxt == NULL))
|
||||
return(-1);
|
||||
cont = elemDecl->content;
|
||||
name = elemDecl->name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user