1
0
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:
Nick Wellnhofer
2025-08-25 12:29:55 +02:00
parent e397651a62
commit 13962f820e

View File

@@ -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;
}