1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-04-24 18:50:07 +03:00

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.
This commit is contained in:
David Kilzer 2022-12-21 19:21:30 -08:00
parent 78c4430f4e
commit 0bd4e4e032

View File

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