Skip to content
Snippets Groups Projects
Commit 1b4791fd authored by Andy Heninger's avatar Andy Heninger
Browse files

Fix error in growing of XMLBuffer from within ensureCapacity()

Fixes crash pointed out by Simon Fell.


git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172354 13f79535-47bb-0310-9956-ffa450edef68
parent a48ff79e
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
/** /**
* $Log$ * $Log$
* Revision 1.5 2000/08/17 00:04:50 andyh
* Fix error in growing of XMLBuffer from within ensureCapacity()
* Fixes crash pointed out by Simon Fell.
*
* Revision 1.4 2000/05/15 22:31:11 andyh * Revision 1.4 2000/05/15 22:31:11 andyh
* Replace #include<memory.h> with <string.h> everywhere. * Replace #include<memory.h> with <string.h> everywhere.
* *
...@@ -135,7 +139,7 @@ void XMLBuffer::insureCapacity(const unsigned int extraNeeded) ...@@ -135,7 +139,7 @@ void XMLBuffer::insureCapacity(const unsigned int extraNeeded)
return; return;
// Oops, not enough room. Calc new capacity and allocate new buffer // Oops, not enough room. Calc new capacity and allocate new buffer
const unsigned int newCap = (unsigned int)((fIndex + fCapacity) * 1.25); const unsigned int newCap = (unsigned int)((fIndex + extraNeeded) * 1.25);
XMLCh* newBuf = new XMLCh[newCap+1]; XMLCh* newBuf = new XMLCh[newCap+1];
// Copy over the old stuff // Copy over the old stuff
......
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