You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Maxim Volkonovsky (JIRA)" <xe...@xml.apache.org> on 2008/01/25 21:16:34 UTC
[jira] Created: (XERCESC-1775) DOMString (deprecated) corruption
DOMString (deprecated) corruption
---------------------------------
Key: XERCESC-1775
URL: https://issues.apache.org/jira/browse/XERCESC-1775
Project: Xerces-C++
Issue Type: Bug
Components: DOM
Affects Versions: 2.7.0, 2.8.0
Environment: any
Reporter: Maxim Volkonovsky
This bug was introduced in revision 176239 (probably to fix bug XERCESC-398). 'clone'd string could be corrupted (truncated) by rawBuffer method. It comes from wrong assumption that DOMString (and rawBuffer returned from it) should be null-terminated.
The following code snippet reproduce the bug:
DOMString test, test2;
test = "OneTwo";
test2 = test.substringData(0, 3);
XERCES_STD_QUALIFIER cout << test.transcode() << XERCES_STD_QUALIFIER endl;
XERCES_STD_QUALIFIER cout << test2.transcode() << XERCES_STD_QUALIFIER endl;
XERCES_STD_QUALIFIER cout << test.transcode() << XERCES_STD_QUALIFIER endl;
transcode (which calls rawBuffer) for 'test2' string truncates 'test' string to 3 characters.
I suppose that the easiest way to fix it - is to rollback diff for revision 176239
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Resolved: (XERCESC-1775) DOMString (deprecated) corruption
Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Massari resolved XERCESC-1775.
--------------------------------------
Resolution: Won't Fix
> DOMString (deprecated) corruption
> ---------------------------------
>
> Key: XERCESC-1775
> URL: https://issues.apache.org/jira/browse/XERCESC-1775
> Project: Xerces-C++
> Issue Type: Bug
> Components: DOM
> Affects Versions: 2.7.0, 2.8.0
> Environment: any
> Reporter: Maxim Volkonovsky
>
> This bug was introduced in revision 176239 (probably to fix bug XERCESC-398). 'clone'd string could be corrupted (truncated) by rawBuffer method. It comes from wrong assumption that DOMString (and rawBuffer returned from it) should be null-terminated.
> The following code snippet reproduce the bug:
> DOMString test, test2;
> test = "OneTwo";
> test2 = test.substringData(0, 3);
> XERCES_STD_QUALIFIER cout << test.transcode() << XERCES_STD_QUALIFIER endl;
> XERCES_STD_QUALIFIER cout << test2.transcode() << XERCES_STD_QUALIFIER endl;
> XERCES_STD_QUALIFIER cout << test.transcode() << XERCES_STD_QUALIFIER endl;
> transcode (which calls rawBuffer) for 'test2' string truncates 'test' string to 3 characters.
> I suppose that the easiest way to fix it - is to rollback diff for revision 176239
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org