xinxinlx / openjpeg

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

malformed PCLR box and openjpeg-1.5 #336

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The image 'data/input/nonregression/mem-b2ace68c-1381.jp2'
contains a malformed PCLR box.

openjpeg-1.5.x-branch dies with a SEGFAULT.

The following lines, added at the end of jp2_read_pclr(),
at least do not trigger a SEGFAULT:

    if (cio_tell(cio) - box->init_pos != box->length)
   {
    opj_event_msg(jp2->cinfo, EVT_ERROR, "Error with PCLR Box\n");
    jp2_free_pclr(color);
    return OPJ_FALSE;
   }
    return OPJ_TRUE;
}/* jp2_read_pclr() */

The

 Successfully generated Outfile

is black. Which is wrong but could be OK.

One could decide: if the PCLR box fails, there can not be
correct colors and therefore the decompression should fail.

winfried

Original issue reported on code.google.com by szukw...@arcor.de on 9 Apr 2014 at 12:20

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 28 Apr 2014 at 7:46

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 28 Apr 2014 at 7:47