Menu

#481 Memory leak in viff.c

v1.0_(example)
closed-fixed
None
5
2017-09-30
2017-09-25
BlueKiller
No

Here is the critical code:

…
        viff_colormap=MagickAllocateMemory(unsigned char *,viff_colormap_size);//502
        if (viff_colormap == (unsigned char *) NULL)
          ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,
                               image);
        /*
          Read VIFF raster colormap.
        */
        if (ReadBlob(image,viff_colormap_size,(char *) viff_colormap)
            != viff_colormap_size)
          ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);//513
        ...

Line 513 do not free memory about viff_colormap, this will cause memory leak.

Credit: ADLab of Venustech

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2017-09-30
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-09-30

    This problem is fixed by Mercurial changeset 15187:149193fc8881. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB