Menu

#509 Memory leak in tiff.c

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

Here is the critical code:

…
          blue=MagickAllocateMemory(unsigned short *,                //5205
                                    65536L*sizeof(unsigned short));
          green=MagickAllocateMemory(unsigned short *,
                                     65536L*sizeof(unsigned short));
          red=MagickAllocateMemory(unsigned short *,
                                   65536L*sizeof(unsigned short));
          if ((blue == (unsigned short *) NULL) ||
              (green == (unsigned short *) NULL) ||
              (red == (unsigned short *) NULL))
            ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,    //5214
                                 image);
…

If one of the “blue”、“green” and “red" 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 15208:21ec7c7a6f70. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB