neilg 2003/08/31 11:10:08 Modified: c/src/xercesc/util/Transcoders/ICU ICUTransService.cpp Log: Fix for bug 21990. Thanks to Shin'ya Morino. Revision Changes Path 1.11 +3 -7 xml-xerces/c/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp Index: ICUTransService.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ICUTransService.cpp 30 May 2003 09:19:24 -0000 1.10 +++ ICUTransService.cpp 31 Aug 2003 18:10:08 -0000 1.11 @@ -907,7 +907,7 @@ } // If targetLen is not enough then buffer overflow might occur - if (err == U_BUFFER_OVERFLOW_ERROR) + if ((err == U_BUFFER_OVERFLOW_ERROR) || (err == U_STRING_NOT_TERMINATED_WARNING)) { // // Reset the error, delete the old buffer, allocate a new one, @@ -936,8 +936,6 @@ return 0; } - // Cap it off and return - retBuf[targetCap] = 0; return retBuf; } @@ -1010,7 +1008,7 @@ } // If targetLen is not enough then buffer overflow might occur - if (err == U_BUFFER_OVERFLOW_ERROR) + if ((err == U_BUFFER_OVERFLOW_ERROR) || (err == U_STRING_NOT_TERMINATED_WARNING)) { // // Reset the error, delete the old buffer, allocate a new one, @@ -1039,8 +1037,6 @@ return 0; } - // Cap it off and return - retBuf[targetCap] = 0; return retBuf; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]