Skip to content

Memory leak in WritePCXImage  #1049

Closed
Closed
@jgj212

Description

@jgj212

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of ImageMagick
  • I have searched open and closed issues to ensure it has not already been reported

Description

Memory leak in WritePCXImage

Steps to Reproduce

      page_table=(MagickOffsetType *) AcquireQuantumMemory(1024UL,  		//line 923, allocation for page_table
        sizeof(*page_table));
      if (page_table == (MagickOffsetType *) NULL)
        ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
    pcx_colormap=(unsigned char *) AcquireQuantumMemory(256UL,
      3*sizeof(*pcx_colormap));
    if (pcx_colormap == (unsigned char *) NULL)
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); 	//line 1001, memory leak as not free page_table

System Configuration

  • ImageMagick version: 7.0.7-28
  • Environment (Operating system, version and so on): Ubuntu14.04 x86_64
  • Additional information:

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