[jira] [Updated] (XERCESC-2052) TranscodeToStr constructor throws TranscodingException claiming an invalid multi byte sequence when it is valid

2016-10-20 Thread Scott Cantor (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-2052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Cantor updated XERCESC-2052:
--
Fix Version/s: 3.1.5

> TranscodeToStr constructor throws TranscodingException claiming an invalid 
> multi byte sequence when it is valid
> ---
>
> Key: XERCESC-2052
> URL: https://issues.apache.org/jira/browse/XERCESC-2052
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 3.1.2, 3.1.3, 3.1.4
> Environment: Windows 32 and 64 bit compiled with VS2010
>Reporter: Nigel Meachen
>Assignee: Alberto Massari
> Fix For: 3.2.0, 3.1.5
>
>
> The following constructor throws an EncodingException
> TranscodeToStr tTransCoder (L"中国制造 / 中國製造","UTF-8", 
> XMLPlatformUtils::fgMemoryManager);
> The code in TranscodeToStr::transcode allocates 26 bytes when 27 are needed, 
> however, it does not reach the reallocation logic as charsRead is returned by 
> trans->transcodeTo as zero. This only occurs in a Release build.



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

-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org



[jira] [Reopened] (XERCESC-2052) TranscodeToStr constructor throws TranscodingException claiming an invalid multi byte sequence when it is valid

2016-10-20 Thread Scott Cantor (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-2052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Cantor reopened XERCESC-2052:
---

Reopening since this was never applied to the active branch.

> TranscodeToStr constructor throws TranscodingException claiming an invalid 
> multi byte sequence when it is valid
> ---
>
> Key: XERCESC-2052
> URL: https://issues.apache.org/jira/browse/XERCESC-2052
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 3.1.2, 3.1.3, 3.1.4
> Environment: Windows 32 and 64 bit compiled with VS2010
>Reporter: Nigel Meachen
>Assignee: Alberto Massari
> Fix For: 3.2.0
>
>
> The following constructor throws an EncodingException
> TranscodeToStr tTransCoder (L"中国制造 / 中國製造","UTF-8", 
> XMLPlatformUtils::fgMemoryManager);
> The code in TranscodeToStr::transcode allocates 26 bytes when 27 are needed, 
> however, it does not reach the reallocation logic as charsRead is returned by 
> trans->transcodeTo as zero. This only occurs in a Release build.



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

-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org



[jira] [Updated] (XERCESC-2052) TranscodeToStr constructor throws TranscodingException claiming an invalid multi byte sequence when it is valid

2016-10-20 Thread Scott Cantor (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-2052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Cantor updated XERCESC-2052:
--
Affects Version/s: 3.1.3
   3.1.4

> TranscodeToStr constructor throws TranscodingException claiming an invalid 
> multi byte sequence when it is valid
> ---
>
> Key: XERCESC-2052
> URL: https://issues.apache.org/jira/browse/XERCESC-2052
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 3.1.2, 3.1.3, 3.1.4
> Environment: Windows 32 and 64 bit compiled with VS2010
>Reporter: Nigel Meachen
>Assignee: Alberto Massari
> Fix For: 3.2.0
>
>
> The following constructor throws an EncodingException
> TranscodeToStr tTransCoder (L"中国制造 / 中國製造","UTF-8", 
> XMLPlatformUtils::fgMemoryManager);
> The code in TranscodeToStr::transcode allocates 26 bytes when 27 are needed, 
> however, it does not reach the reallocation logic as charsRead is returned by 
> trans->transcodeTo as zero. This only occurs in a Release build.



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

-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org



RE: Porting XERCESC-2052 fix to 3.1 branch

2016-10-20 Thread Cantor, Scott
> I had a transcoding problem with Xerces-C and noticed that it has
> already been described
> https://issues.apache.org/jira/browse/XERCESC-2052 and fixed for more
> than a year but not in the 3.1 branch.
> So I took the liberty to port the fix and would be happy if it could be
> released in a (hopefully soon) upcoming 3.1.5 or if 3.2 is just around
> corner, this would be even better.

I ported a number of patches from trunk back to the branch when I first jumped 
in to get security work done on the branch and put 3.1.2 out. This seems to 
have been filed against 3.1.2, so I don't think I ever saw that one, it 
probably wasn't brought to my attention and the bug entry doesn't have the fix 
outlined either. And I am generally terrified of touching transcoding code 
since I don't understand any of it, so that all explains why it wasn't 
backported.

The major problem is that I have no way to test fixes to code I don't 
understand. That's the biggest problem, paralysis out of fear of breaking 
something.

If somebody vouches for the fix, I don't have a problem applying it, but I 
can't possibly know whether the fix is safe beyond just taking somebody's word 
for it.

Either way, I'd advise attaching the patch to the bug, and I'll reopen it for 
now just to track that it hasn't been backported.

-- Scott


-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org