You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jo...@apache.org on 2009/03/27 22:55:04 UTC
svn commit: r759366 - /xerces/c/trunk/src/xercesc/util/TransService.cpp
Author: johns
Date: Fri Mar 27 21:55:03 2009
New Revision: 759366
URL: http://svn.apache.org/viewvc?rev=759366&view=rev
Log:
Fixed a bug when transcoding small strings using TranscodeToStr (XERCESC-1858)
Modified:
xerces/c/trunk/src/xercesc/util/TransService.cpp
Modified: xerces/c/trunk/src/xercesc/util/TransService.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/TransService.cpp?rev=759366&r1=759365&r2=759366&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/TransService.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/TransService.cpp Fri Mar 27 21:55:03 2009
@@ -632,7 +632,7 @@
}
// null terminate
- if(fBytesWritten > (allocSize - 4)) {
+ if(fBytesWritten + 4 > allocSize) {
allocSize = fBytesWritten + 4;
XMLByte *newBuf = (XMLByte*)fMemoryManager->allocate(allocSize);
memcpy(newBuf, fString, fBytesWritten);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org