You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2002/05/23 23:27:22 UTC
cvs commit: xml-xerces/c/src/xercesc/validators/schema SchemaValidator.cpp
knoaman 02/05/23 14:27:21
Modified: c/src/xercesc/validators/schema SchemaValidator.cpp
Log:
Fix "Array Bound Read" problem reported by Purify.
Revision Changes Path
1.10 +9 -1 xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp
Index: SchemaValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SchemaValidator.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SchemaValidator.cpp 19 Apr 2002 13:33:23 -0000 1.9
+++ SchemaValidator.cpp 23 May 2002 21:27:21 -0000 1.10
@@ -56,6 +56,9 @@
/*
* $Log: SchemaValidator.cpp,v $
+ * Revision 1.10 2002/05/23 21:27:21 knoaman
+ * Fix "Array Bound Read" problem reported by Purify.
+ *
* Revision 1.9 2002/04/19 13:33:23 knoaman
* Fix for bug 8236.
*
@@ -901,6 +904,12 @@
//
void SchemaValidator::normalizeWhiteSpace(DatatypeValidator* dV, const XMLCh* const value, XMLBuffer& toFill)
{
+ toFill.reset();
+
+ //empty string
+ if (!*value)
+ return;
+
short fWhiteSpace = DatatypeValidator::PRESERVE;
if (dV)
fWhiteSpace = dV->getWSFacet();
@@ -912,7 +921,6 @@
};
States curState = InContent;
- toFill.reset();
//
// Loop through the chars of the source value and normalize it according
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org