[ 
https://issues.apache.org/jira/browse/XERCESC-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341111#comment-14341111
 ] 

Scott Cantor commented on XERCESC-2020:
---------------------------------------

Added to 3.1 branch, r1662865

> Off-by-one error in TranscodeFromStr (with ICU)
> -----------------------------------------------
>
>                 Key: XERCESC-2020
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2020
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 3.1.1
>         Environment: ICU, Visual C++ 2012
>            Reporter: Martin Raiber
>            Assignee: Alberto Massari
>             Fix For: 3.1.2, 3.2.0
>
>
> The char-Array charSizes in TranscodeFromStr::transcode is initialized with 
> length csSize.
> ICUTranscoder::transcodeFrom is called with maxChars=csSize+1.
> For a fixed length encoding charSizes is set via memset(charSizes, fillSize, 
> maxChars); writing one character too much.
> To reproduce:
> xercesc::TranscodeFromStr transcoder(reinterpret_cast<const XMLByte*>("foo"), 
> 3, "ISO-8859-15");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to