From: Mathieu Malaterre Date: Wed, 26 Feb 2014 11:17:18 +0000 (+0000) Subject: [trunk] Import patch from sumatrapdf team. This handle testcase 2977.pdf.asan.67... X-Git-Tag: version.2.0.1~4^2~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19887b7b8c4e1cdc54d25a3d10be2415a1385816;p=openjpeg [trunk] Import patch from sumatrapdf team. This handle testcase 2977.pdf.asan.67.2198 Update issue 225 --- diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index aa4f1d1d..792c1c9f 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -7766,6 +7766,10 @@ OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_im if( (l_offset_x0_src < 0 ) || (l_offset_y0_src < 0 ) || (l_offset_x1_src < 0 ) || (l_offset_y1_src < 0 ) ){ return OPJ_FALSE; } + /* testcase 2977.pdf.asan.67.2198 */ + if ((OPJ_INT32)l_width_dest < 0 || (OPJ_INT32)l_height_dest < 0) { + return OPJ_FALSE; + } /*-----*/ /* Compute the input buffer offset */