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/08/31 20:10:08 UTC
cvs commit: xml-xerces/c/src/xercesc/util/Transcoders/ICU ICUTransService.cpp
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: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org