You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/06 17:35:33 UTC
DO NOT REPLY [Bug 6924] New: -
doTranscodeFromLocalCodePage() doesn't work for non-null-terminated strings
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6924>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6924
doTranscodeFromLocalCodePage() doesn't work for non-null-terminated strings
Summary: doTranscodeFromLocalCodePage() doesn't work for non-
null-terminated strings
Product: XalanC
Version: 1.3.x
Platform: PC
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: XalanC
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: levinson@ice.ru
doTranscodeFromLocalCodePage() makes the following call:
const size_t theTargetLength = ::mbstowcs(
0,
theSourceString,
size_t(theSourceStringLength));
regardless of the theSourceStringIsNullTerminated value. Since first parameter
is 0, mbstowcs() ignores count, and attempts to process garbage beyond the end
of the string (causing it return -1 occasionally).