You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sc...@apache.org on 2019/12/30 16:10:54 UTC
svn commit: r1872119 - /xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp
Author: scantor
Date: Mon Dec 30 16:10:54 2019
New Revision: 1872119
URL: http://svn.apache.org/viewvc?rev=1872119&view=rev
Log:
XERCESC-2158 - Multi-byte bug in UTF8 Transcoder
Modified:
xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp
Modified: xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp?rev=1872119&r1=1872118&r2=1872119&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUTF8Transcoder.cpp Mon Dec 30 16:10:54 2019
@@ -391,12 +391,13 @@ XMLUTF8Transcoder::transcodeFrom(const
//
// If we have enough room to store the leading and trailing
// chars, then lets do it. Else, pretend this one never
- // happened, and leave it for the next time. Since we don't
- // update the bytes read until the bottom of the loop, by
- // breaking out here its like it never happened.
+ // happened, and leave it for the next time.
//
if (outPtr + 1 >= outEnd)
+ {
+ srcPtr -= (trailingBytes + 1);
break;
+ }
// Store the leading surrogate char
tmpVal -= 0x10000;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org