diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-18 12:47:45 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-18 12:47:45 +0000 |
| commit | 69cd4f9211a33367e11563240ca1d5e095a804af (patch) | |
| tree | 79dd6281b6d2942566ce6698727ab7f8b2dbfd1c /libopenjpeg/tcd.c | |
| parent | 6fc2b568477386d8c7031e7e421750cf1444da2e (diff) | |
[1.5] Import portion of patch from issue 297
Run test suite on new datasets
Update issue 297
Diffstat (limited to 'libopenjpeg/tcd.c')
| -rw-r--r-- | libopenjpeg/tcd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index 3ad6cf5a..c05b13df 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -1387,6 +1387,7 @@ opj_bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno if (l == -999) { eof = 1; opj_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n"); + return OPJ_FALSE; } /*------------------TIER1-----------------*/ @@ -1454,6 +1455,13 @@ opj_bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno int n = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0); if (tile->numcomps >= 3 ){ + /* testcase 1336.pdf.asan.47.376 */ + if ((tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0) < n || + ( tile->comps[1].x1 - tile->comps[1].x0) * (tile->comps[1].y1 - tile->comps[1].y0) < n || + ( tile->comps[2].x1 - tile->comps[2].x0) * (tile->comps[2].y1 - tile->comps[2].y0) < n) { + opj_event_msg(tcd->cinfo, EVT_ERROR, "Tiles don't all have the same dimension. Skip the MCT step.\n"); + return OPJ_FALSE; + } if (tcd->tcp->tccps[0].qmfbid == 1) { mct_decode( tile->comps[0].data, |
