Bug 305821 - Patch for memory leak in ImageMagick 6.3.5-9
Summary: Patch for memory leak in ImageMagick 6.3.5-9
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ImageMagick
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Norm Murray
QA Contact: Fedora Extras Quality Assurance
URL: http://www.imagemagick.org
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-25 18:39 UTC by Cristy
Modified: 2008-04-26 08:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-26 08:09:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Cristy 2007-09-25 18:39:33 UTC
There is a small memory leak when cloning strings in ImageMagick 6.3.5-9.  The
patch is already in ImageMagick 6.3.6-0 scheduled for release on September 29. 
To patch ImageMagick 6.3.5-9, remove

   *destination=(char *) NULL; 

in CloneString() of magick/string.c.  The results should look like this:

  if (source == (const char *) NULL)
    {
      if (*destination != (char *) NULL)
        *destination=DestroyString(*destination);
      return(*destination);
    }
  if (*destination == (char *) NULL)
    {
      *destination=AcquireString(source);
      return(*destination);
    }
  length=strlen(source);
  if (~length < MaxTextExtent)
    ThrowFatalException(ResourceLimitFatalError,"UnableToAcquireString");
  *destination=(char *) ResizeQuantumMemory(*destination,length+MaxTextExtent,
    sizeof(*destination));

Comment 1 Norm Murray 2007-09-26 05:17:58 UTC
Thanks for the heads up. Will get this into my next build. 

Comment 2 Bug Zapper 2008-04-04 13:55:01 UTC
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 3 Hans de Goede 2008-04-26 08:09:21 UTC
Short intro: I'm a new co-maintainer of ImageMagick and as such walking through
all open bugs.

This bug is fixed in rawhide / F-9 closing.



Note You need to log in before you can comment on or make changes to this bug.