Skip to content

memory leak in WritePDFImage #576

Closed
Closed
@jgj212

Description

@jgj212

Version: ImageMagick 7.0.6-2 Q16 x86_64

./magick convert $FILE  out.pdf

==12427==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16520 byte(s) in 1 object(s) allocated from:
    #0 0x4df26d in realloc asan_malloc_linux.cc:79
    #1 0x7f700a388a93 in ResizeMagickMemory memory.c:1224:9
    #2 0x7f700a388b2d in ResizeQuantumMemory memory.c:1288:10
    #3 0x7f700a839206 in WritePDFImage pdf.c:1451:33
    #4 0x7f700a1666fe in WriteImage constitute.c:1114:14
    #5 0x7f700a1675fd in WriteImages constitute.c:1333:13
    #6 0x7f7009812900 in ConvertImageCommand convert.c:3280:11
    #7 0x7f70099610cf in MagickCommandGenesis mogrify.c:183:14
    #8 0x514a37 in MagickMain magick.c:149:10
    #9 0x514491 in main magick.c:180:10
    #10 0x7f700419ef44 in __libc_start_main libc-start.c:287


POC: https://github.com/jgj212/poc/blob/master/leak-WritePDFImage

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