xuewend / openjpeg

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

potential overflow in opj_j2k_get_tile_data() method #502

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In this line:

 l_src_ptr = l_img_comp->data + ((OPJ_UINT32)l_tilec->x0 - l_offset_x) + ((OPJ_UINT32)l_tilec->y0 - l_offset_y) * l_image_width;

l_image_width needs to be cast to OPJ_SIZE_T, and this will be fixed.

It might be useful for someone go through all offset calculations in library, 
and hunt for overflows.

Original issue reported on code.google.com by boxe...@gmail.com on 4 Jun 2015 at 8:49