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 bu...@apache.org on 2002/11/27 21:18:14 UTC

DO NOT REPLY [Bug 14912] New: - Crash in the schema validator

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14912>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14912

Crash in the schema validator

           Summary: Crash in the schema validator
           Product: Xerces-C++
           Version: 2.1.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: alby@exceloncorp.com


When validating a file using the schema at 
http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd using a SAXParser 
prepared with setExitOnFirstFatalError(false), setDoValidation(true), 
setDoNamespaces(true), setDoSchema(true) and setValidationSchemaFullChecking
(true), the validator crashes inside UnionDatatypeValidator::isSubstitutableBy 
because the fMemberTypeValidators is NULL.

A simple fix for this problem is the following patch:

cvs diff -u UnionDatatypeValidator.hpp 
Index: UnionDatatypeValidator.hpp
===================================================================
RCS file: /home/cvspublic/xml-
xerces/c/src/xercesc/validators/datatype/UnionDatatypeValidator.hpp,v
retrieving revision 1.3
diff -u -r1.3 UnionDatatypeValidator.hpp
--- UnionDatatypeValidator.hpp	4 Nov 2002 14:53:28 -0000	1.3
+++ UnionDatatypeValidator.hpp	27 Nov 2002 19:21:49 -0000
@@ -322,6 +322,10 @@
         return true;
     }
 
+    if (!fMemberTypeValidators) {
+        return false;
+    }
+
     unsigned int memberSize = fMemberTypeValidators->size();
 
     for (unsigned int i=0; i < memberSize; i++) {

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