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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/04 16:11:32 UTC
[jira] Closed: (XERCESC-1480) Memory Leak when parsing input with
an undefined encoding
[ https://issues.apache.org/jira/browse/XERCESC-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1480.
------------------------------------
Resolution: Fixed
Fix is in SVN.
> 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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org