troosh / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

opj_image_destroy doesn't free icc_profile_buf #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load one of the JPXEncoded images contained in 
http://planeta.tc/upload-files/amino130M.pdf (e.g. through MuPDF)
2. Free the image

What is the expected output? What do you see instead?
There's a memory leak caused by icc_profile_buf not being freed (the buffer is 
allocated in jp2_read_colr and assigned to the opj_jp2_t struct in jp2_decode).

Original issue reported on code.google.com by zeniko on 2 Mar 2011 at 1:38

GoogleCodeExporter commented 9 years ago
OpenJPEG-2.0.0-revision-737
===========================
libopenjpeg/jp2.c, jp2_read_colr(), line 1489:

    /*else
    {
        // do not care with profiles.
    }*/

OpenJPEG-1.4.0-revision-737
===========================
libopenjpeg/jp2.c, jp2_read_colr(), line 574:

    color->icc_profile_buf = (unsigned char*)opj_malloc(skip_len);
    color->icc_profile_len = skip_len;

Zen: what are you writing about?

winfried

Original comment by szukw...@arcor.de on 6 Mar 2011 at 6:40

GoogleCodeExporter commented 9 years ago
This is about 
http://code.google.com/p/openjpeg/source/browse/trunk/libopenjpeg/jp2.c - which 
I (apparently wrongly) assumed to be your latest version.

Original comment by zeniko on 6 Mar 2011 at 9:51

GoogleCodeExporter commented 9 years ago
issue fixed.

Original comment by anto...@gmail.com on 3 Jul 2011 at 6:10