Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.5.0, 2.6.0
-
None
-
None
-
win2k on ix86.
Description
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> &
) 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 &
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.
Attachments
Attachments
Issue Links
- duplicates
-
XERCESC-1470 segmentation fault in xerces 2.6.0 on this file for unknown reason
- Resolved