diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-02-26 11:17:18 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-02-26 11:17:18 +0000 |
| commit | 19887b7b8c4e1cdc54d25a3d10be2415a1385816 (patch) | |
| tree | 5df542cef989eae9c634ee5305005fcf649f0908 /src/lib | |
| parent | 005e75bdc390fb81307d325ee90086a26e95f954 (diff) | |
[trunk] Import patch from sumatrapdf team. This handle testcase 2977.pdf.asan.67.2198
Update issue 225
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |
