[trunk] Import patch from sumatrapdf team. This handle testcase 2977.pdf.asan.67.2198

Update issue 225
This commit is contained in:
Mathieu Malaterre 2014-02-26 11:17:18 +00:00
parent 005e75bdc3
commit 19887b7b8c
1 changed files with 4 additions and 0 deletions

View File

@ -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 */