Re: [xml] [libxml2] Schema parsing bug



On Fri, Sep 06, 2002 at 11:57:58AM -0400, Jeff Goff wrote:
Under libxml2-2.4.24 under RH Linux 7.3, attempting to parse the
following XML Schema with the test program 'testSchema' causes a
segmentation fault:

--cut here--
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" attribute
FormDefault="unqualified">
    <xs:element name="foo">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="bar" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
                <xs:element name="baz" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>  
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
--cut here--

The problem seems to be somewhere in xmlFARecurseDeterminism in
xmlregexp.c, but we haven't been able to trace it down farther than
that.

  Hum, that's really experimental code. The very silly mistake generating
this was to try to compute if the automata was determinist without first
eliminating the epsilon transitions ... surprizing it didn't break earlier :-\

  Fixed in CVS, patch enclosed.

paphio:~/XML -> cat tst.xml
<foo>
  <baz>hello</baz>
  <baz>bonjour</baz>
</foo>
paphio:~/XML -> ./testSchemas tst.xsd tst.xml
[...]
Element foo content check succeeded
tst.xml validates
paphio:~/XML -> 

  thanks for the report !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Attachment: deter.patch
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]