You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/18 07:54:39 UTC

[jira] Updated: (XERCESC-1232) Access violation when validating against invalid schema

     [ https://issues.apache.org/jira/browse/XERCESC-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov updated XERCESC-1232:
-------------------------------------

    Affects Version/s:     (was: 2.5.0)
                       3.1.0

Segfault is still there in the 3.1.0 codebase.

> Access violation when validating against invalid schema
> -------------------------------------------------------
>
>                 Key: XERCESC-1232
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1232
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 3.1.0
>         Environment: Windows XP - VC++ 6.0 SP5
>            Reporter: Alberto Massari
>         Attachments: Feb2.xml, t1.xsd, x1.xsd, xsi.xsd
>
>
> I received an invalid schema, where a schema with no target namespace imported a second schema (with a target namespace) that, in turn, imported a third schema having no target namespace. When an instance of XML is validated against this schema, an access violation occurs when trying to use the fGrammar for the top level XML element, as it had already been deleted.
> This happens because TraverseSchema::preprocessImport is testing for a duplicate grammar being imported only if the grammar has a namespace; if a grammar with no namespace is imported, it is parsed again and placed in the grammar resolver. But the grammar resolver will delete the Grammar object previously associated with that key, and when that Grammar object will be restored at the end of the processing of the xs:import statement, it will be an invalid pointer.
> To reproduce the access violation, run 
> DOMPrint -n -s feb2.xml
> on the attached files.
> Alberto

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org