FS#50600 - libxml2 2.9.4 fails to handle attributes in schemas correctly

Attached to Project: Arch Linux
Opened by Staale Aakermann (staale) - Tuesday, 30 August 2016, 20:12 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 31 August 2016, 08:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
There is an BUG introduced in libxml2 2.9.4 that results in incorrect handling of attributes in xml schemas.

Additional info:
* package version = 2.9.4

Steps to reproduce:

validate an xml file with a schema that requires an attribute other than text fails.

test.xml:
<?xml version="1.0"?>
<Something version="5"/>

test.xsd:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="Something">
<xs:complexType>
<xs:attribute name="version" type="xs:integer" use="required" fixed="5"/>
</xs:complexType>
</xs:element>
</xs:schema>



xml val -e -s test.xsd -q test.xml
test.xml:2.23: Element 'Something', attribute 'version': '' is not a valid value of the atomic type 'xs:integer'.

attached patch solves this issue:


This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 31 August 2016, 08:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed by updating to git snapshot. Also fixes a possible NULL-pointer dereference.

Loading...