Menu

#501 memory leak in ReadMNGImage

v1.0_(example)
closed-fixed
None
5
2017-10-01
2017-09-25
bestshow
No

Here is the critical code : (in ReadMNGImage)

                  row_length=(size_t) (image->columns*sizeof(PixelPacket)); //5412
                  next=MagickAllocateMemory(PixelPacket *,row_length);      //5413
                  prev=MagickAllocateMemory(PixelPacket *,row_length);
                  if ((prev == (PixelPacket *) NULL) ||
                      (next == (PixelPacket *) NULL))
                    {
                      DestroyImageList(image);
                      MngInfoFreeStruct(mng_info,&have_mng_structure);
                      ThrowReaderException(ResourceLimitError,
                                           MemoryAllocationFailed,image)
                    }

If one of the “next”、“prev” is not null in “if statement”,it may cause memory leak error.

Credit: ADLab of Venustech

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2017-10-01
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-10-01

    This problem is fixed by Mercurial changeset 15212:0d59486cb62b. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB