From 0bd4e4e032d57ecf982b57312eb6136efdd35d56 Mon Sep 17 00:00:00 2001 From: David Kilzer Date: Wed, 21 Dec 2022 19:21:30 -0800 Subject: [PATCH] xmlParseStartTag2() contains typo when checking for default definitions for an attribute in a namespace * parser.c: (xmlParseStartTag2): - Fix index into defaults->values. It is only correct the first time through the loop when i == 0. Fixes #467. --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index eb3d1d48..1bfcacb4 100644 --- a/parser.c +++ b/parser.c @@ -9593,7 +9593,7 @@ next_attr: if (j <= nbNs) continue; nsname = xmlGetNamespace(ctxt, attname); - if (nsname != defaults->values[2]) { + if (nsname != defaults->values[5 * i + 2]) { if (nsPush(ctxt, attname, defaults->values[5 * i + 2]) > 0) nbNs++;