Menu

#499 memory leak in avs.c

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

Here is the critical code : ( in avs.c)

pixels=MagickAllocateArray(unsigned char *,image->columns,4); //158
    if (pixels == (unsigned char *) NULL)
      ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image);
    row_bytes=4*image->columns;
    for (y=0; y < (long) image->rows; y++)
    {
      if (ReadBlob(image,row_bytes,pixels) != row_bytes)
        {
          ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,  //166
                         image->filename);
          status=MagickFail;
        }

Line 166 do not free memory about pixels, 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 15205:d58b78194747. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB