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 "Alain Le Guennec (JIRA)" <xe...@xml.apache.org> on 2005/09/21 16:32:28 UTC

[jira] Updated: (XERCESC-1504) Access violation during parsing with schema validation turned on if a needed schema is missing.

     [ http://issues.apache.org/jira/browse/XERCESC-1504?page=all ]

Alain Le Guennec updated XERCESC-1504:
--------------------------------------

    Attachment: input.xml

The input file.

> Access violation during parsing with schema validation turned on if a needed schema is missing.
> -----------------------------------------------------------------------------------------------
>
>          Key: XERCESC-1504
>          URL: http://issues.apache.org/jira/browse/XERCESC-1504
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.6.0, 2.5.0
>  Environment: win2k on ix86.
>     Reporter: Alain Le Guennec
>  Attachments: input.xml
>
> There is an access violation during parsing in some circumstances if schema validation is on
> and one of the schema needed to fully validate the document is missing.
> Attached is a reduced test case, in the form of a .xsd schema and a .xml document,
> which refers to that schema and to another, missing, schema.
> Running "DOMPrint.exe -n -s input.xml" will trigger the access violation.
> I could reproduce the bug in both xercesc-2.5 and 2.6, but not in xercesc-2.7.
> The call-stack is:
> xercesc_2_5::RefHashTableOf<xercesc_2_5::DTDAttDef>::findBucketElem(const void * const 0x04601f20, unsigned int & 302830086) line 527 + 3 bytes
> xercesc_2_5::RefHashTableOf<xercesc_2_5::DTDAttDef>::get(const void * const 0x04601f20) line 405 + 16 bytes
> xercesc_2_5::DTDElementDecl::getAttDef(const unsigned short * const 0x04601f20) line 297
> xercesc_2_5::IGXMLScanner::buildAttList(const xercesc_2_5::RefVectorOf<xercesc_2_5::KVStringPair> & {...}, const unsigned int 2, xercesc_2_5::XMLElementDecl * 0x04782738, xercesc_2_5::RefVectorOf<xercesc_2_5::XMLAttr> & {...}) line 313 + 12 bytes
> xercesc_2_5::IGXMLScanner::scanStartTagNS(unsigned char & 1) line 2843 + 42 bytes
> xercesc_2_5::IGXMLScanner::scanContent() line 939
> xercesc_2_5::IGXMLScanner::scanDocument(const xercesc_2_5::InputSource & {...}) line 251 + 8 bytes
> xercesc_2_5::AbstractDOMParser::parse(const xercesc_2_5::InputSource & {...}) line 461
> As one can see, a SchemaElementDecl* is wrongly cast to a DTDElementDecl*, hence the access violation!
> Best regards,
> Alain Le Guennec.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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