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 previous commit.
This commit is contained in:
Nick Wellnhofer
2025-08-25 12:29:55 +02:00
parent 1172b777fa
commit 9fb54d0a62

View File

@@ -4314,7 +4314,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr 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;
}