diff options
| author | Antonin Descampe <antonin@gmail.com> | 2016-04-30 13:51:01 +0200 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2016-04-30 13:51:01 +0200 |
| commit | 72deb588cbc8d5f56f8b0db3a2d120913e792cb8 (patch) | |
| tree | 12486031413a58b5142c5e7eb5e2d1f3f27e0786 /src | |
| parent | cd77b6003b774dd337835630ea7b9b1fbc68d264 (diff) | |
| parent | 20789fed4ec7746e938dd2934a1fb5aa352f4d12 (diff) | |
Merge pull request #706 from mayeut/issue135
Fix issue 135
The fix is legal regarding the standard but I did not manage to find out if it covers a bug in opj_t2_read_packet_data or if the file is corrupted
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/t1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/t1.c b/src/lib/openjp2/t1.c index ae83fd52..1e9480bd 100644 --- a/src/lib/openjp2/t1.c +++ b/src/lib/openjp2/t1.c @@ -1405,7 +1405,7 @@ static OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1, } } - for (passno = 0; passno < seg->real_num_passes; ++passno) { + for (passno = 0; (passno < seg->real_num_passes) && (bpno_plus_one >= 1); ++passno) { switch (passtype) { case 0: if (type == T1_TYPE_RAW) { |
