mirror of
https://github.com/GNOME/libxml2.git
synced 2025-10-14 02:58:39 +08:00
valid: Fix null deref in xmlValidateOneAttribute
Short-lived regression from d53ba058
.
This commit is contained in:
2
valid.c
2
valid.c
@@ -3963,7 +3963,7 @@ xmlValidateOneAttribute(xmlValidCtxt *ctxt, xmlDoc *doc,
|
||||
|
||||
/* Validity Constraint: ID uniqueness */
|
||||
if (attrDecl->atype == XML_ATTRIBUTE_ID &&
|
||||
(ctxt->flags & XML_VCTXT_IN_ENTITY) == 0) {
|
||||
(ctxt == NULL || (ctxt->flags & XML_VCTXT_IN_ENTITY) == 0)) {
|
||||
if (xmlAddID(ctxt, doc, value, attr) == NULL)
|
||||
ret = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user