Skip to content

memory leak in ReadSGIImage #759

Closed
Closed
@jgj212

Description

@jgj212

Here is the ciritical code:

        if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) //line 649
            ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");  //forget to free pixel_info

It can be solved by this:

        if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
          {
            pixel_info=RelinquishVirtualMemory(pixel_info);
            ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
          }

Credit: ADLab of venustech

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions