Skip to content
Snippets Groups Projects
Commit c4b47e59 authored by Neil Graham's avatar Neil Graham
Browse files

fix two overflow conditions

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175598 13f79535-47bb-0310-9956-ffa450edef68
parent 5c3a640b
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $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 * 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. * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
* *
...@@ -241,7 +244,7 @@ void XMLBigDecimal::setDecimalValue(const XMLCh* const strValue) ...@@ -241,7 +244,7 @@ void XMLBigDecimal::setDecimalValue(const XMLCh* const strValue)
XMLCh* XMLBigDecimal::getCanonicalRepresentation(const XMLCh* const rawData XMLCh* XMLBigDecimal::getCanonicalRepresentation(const XMLCh* const rawData
, MemoryManager* const memMgr) , 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); ArrayJanitor<XMLCh> janName(retBuf, memMgr);
int sign, totalDigits, fractDigits; int sign, totalDigits, fractDigits;
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $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 * 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. * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
* *
...@@ -119,7 +122,7 @@ XERCES_CPP_NAMESPACE_BEGIN ...@@ -119,7 +122,7 @@ XERCES_CPP_NAMESPACE_BEGIN
XMLCh* XMLBigInteger::getCanonicalRepresentation(const XMLCh* const rawData XMLCh* XMLBigInteger::getCanonicalRepresentation(const XMLCh* const rawData
, MemoryManager* const memMgr) , 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; int sign = 0;
XMLBigInteger::parseBigInteger(rawData, retBuf, sign); XMLBigInteger::parseBigInteger(rawData, retBuf, sign);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment