[
https://issues.apache.org/jira/browse/XERCESC-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Boris Kolpackov updated XERCESC-1480:
-------------------------------------
Component/s: Utilities
Priority: Major (was: Minor)
Fix Version/s: 3.1.0
Should probably try to fix this for 3.1.0 if it is still there.
> Memory Leak when parsing input with an undefined encoding
> ---------------------------------------------------------
>
> Key: XERCESC-1480
> URL: https://issues.apache.org/jira/browse/XERCESC-1480
> Project: Xerces-C++
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.6.0
> Environment: Reproduced on:
> Solaris 8: SunOS 5.8 Generic_117350-06 sun4u sparc SUNW,Sun-Fire-V240
> Suse Linux 9.2: Linux 2.6.8-24.14-default #1 Tue Mar 29 09:27:43 UTC 2005
> i686 i686 i386 GNU/Linux
> Windows 2000/XP SP 2
> Reporter: Tito Pena
> Assignee: David Bertoni
> Fix For: 3.1.0
>
>
> When creating an XMLReader object with an InputSource which has an unknown
> encoding, a TranscodingException is thrown, leaking the fPublicId, fSystemId
> and fEncodingStr members. This occurs on lines 261 and 357 in XMLReader.cpp.
> I am including a diff -C3 patch for the fille.
> *** ./xerces-c-src_2_6_0/src/xercesc/internal/XMLReader.cpp Fri Aug 19
> 13:19:46 2005
> --- ./xerces-c-src_2_6_0/src/xercesc/internal/XMLReader.cpp.pat Fri Aug
> 19 13:25:54 2005
> ***************
> *** 258,263 ****
> --- 258,267 ----
>
> if (!fTranscoder)
> {
> + fMemoryManager->deallocate(fPublicId);
> + fMemoryManager->deallocate(fSystemId);
> + ArrayJanitor<XMLCh> janValue(fEncodingStr, fMemoryManager);
> +
> ThrowXMLwithMemMgr1
> (
> TranscodingException
> ***************
> *** 354,359 ****
> --- 358,367 ----
>
> if (!fTranscoder)
> {
> + fMemoryManager->deallocate(fPublicId);
> + fMemoryManager->deallocate(fSystemId);
> + ArrayJanitor<XMLCh> janValue(fEncodingStr, fMemoryManager);
> +
> ThrowXMLwithMemMgr1
> (
> TranscodingException
--
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: [email protected]
For additional commands, e-mail: [email protected]