List Info

Thread: Patches to 6.3.3




Patches to 6.3.3
user name
2007-03-23 13:00:46
Hi, thanks for developing the library ImageMagick, it's
incredibly
useful.

I've found 2 small memory leaks in wand/magick-image.c and
magick/stream.c and made some minor changes to the gif coder
to make
reading and pinging images faster. The changes were
originally made
relative to 6.3.1, but I updated the changes for 6.3.3 and
these diffs
are relative to 6.3.3.

Here's a summary of the changes to each source file:

wand/magick-image.c had a leak in
MagickGetImageColormapColor. message
is an allocated string, but ThrowWandException returns
MagickFalse as a
side-effect, causing the allocated string to be leaked.

magick/stream.c had a leak in DestroyPixelStream. I didn't
completely
understand this part of the code, but it looks like
DestroyPixelStream
in magick/stream.c does many of the things that
DestroyCacheInfo in
magick/cache.c does--one path is for a CacheInfo struct in
an ImageInfo
struct, and the other is for a CacheInfo structs inside an
Image struct?
However, DestroyPixelStream doesn't clean up
cache_info->nexus_info
while DestroyCacheInfo does, which is a bug as GetCacheInfo
allocates it
and is called both from magick/stream.c and magick/cache.c.

coders/gif.c inlines several small functions that are called
repeatedly
by ReadBlobLZWByte. I also wrote an alternative to
DecodeImage called
FasterDecodeImage that reads all the bytes for a given image
within a
gif without actually uncompressing anything. This turns out
to speed up
image pinging a lot.

Here are the diffs, as 3 separate attachments. Feel free to
modify as
you wish or ignore if you don't want to accept the changes.
If these
changes are incorrect, however, feedback would be
appreciated so we can
back out or modify our local changes to 6.3.1.

Thanks!

   --Mark

_______________________________________________
Magick-bugs mailing list
Magick-bugsimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-
bugs

  
  
  
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )