Skip to content

Memory leak in WritePDBImage  #1050

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 WritePDBImage

Steps to Reproduce

  runlength=(unsigned char *) AcquireQuantumMemory(9UL*packets,  			//line 846, allocation for runlength
    image->rows*sizeof(*runlength));
  buffer=(unsigned char *) AcquireQuantumMemory(512,sizeof(*buffer));
  scanline=(unsigned char *) AcquireQuantumMemory(image->columns,packet_size*
    sizeof(*scanline));
  quantum_info=AcquireQuantumInfo(image_info,image);
  if (quantum_info == (QuantumInfo *) NULL)
    ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");  	//line 871, memory leak as not free runlength

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