You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/12/17 21:42:16 UTC
cvs commit: xml-xerces/c/src/xercesc/util XMLBigDecimal.cpp XMLBigInteger.cpp
neilg 2003/12/17 12:42:16
Modified: c/src/xercesc/util XMLBigDecimal.cpp XMLBigInteger.cpp
Log:
fix two overflow conditions
Revision Changes Path
1.17 +5 -2 xml-xerces/c/src/xercesc/util/XMLBigDecimal.cpp
Index: XMLBigDecimal.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLBigDecimal.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- XMLBigDecimal.cpp 17 Dec 2003 00:18:35 -0000 1.16
+++ XMLBigDecimal.cpp 17 Dec 2003 20:42:16 -0000 1.17
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.17 2003/12/17 20:42:16 neilg
+ * fix two overflow conditions
+ *
* Revision 1.16 2003/12/17 00:18:35 cargilld
* Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
*
@@ -241,7 +244,7 @@
XMLCh* XMLBigDecimal::getCanonicalRepresentation(const XMLCh* const rawData
, MemoryManager* const memMgr)
{
- XMLCh* retBuf = (XMLCh*) memMgr->allocate( XMLString::stringLen(rawData) * sizeof(XMLCh));
+ XMLCh* retBuf = (XMLCh*) memMgr->allocate( (XMLString::stringLen(rawData)+1) * sizeof(XMLCh));
ArrayJanitor<XMLCh> janName(retBuf, memMgr);
int sign, totalDigits, fractDigits;
1.9 +5 -2 xml-xerces/c/src/xercesc/util/XMLBigInteger.cpp
Index: XMLBigInteger.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLBigInteger.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XMLBigInteger.cpp 17 Dec 2003 00:18:35 -0000 1.8
+++ XMLBigInteger.cpp 17 Dec 2003 20:42:16 -0000 1.9
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.9 2003/12/17 20:42:16 neilg
+ * fix two overflow conditions
+ *
* Revision 1.8 2003/12/17 00:18:35 cargilld
* Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
*
@@ -119,7 +122,7 @@
XMLCh* XMLBigInteger::getCanonicalRepresentation(const XMLCh* const rawData
, MemoryManager* const memMgr)
{
- XMLCh* retBuf = (XMLCh*) memMgr->allocate( XMLString::stringLen(rawData) * sizeof(XMLCh));
+ XMLCh* retBuf = (XMLCh*) memMgr->allocate( (XMLString::stringLen(rawData)+1) * sizeof(XMLCh));
int sign = 0;
XMLBigInteger::parseBigInteger(rawData, retBuf, sign);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org