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
This commit is contained in:
Antonin Descampe 2016-04-30 13:51:01 +02:00
commit 72deb588cb
9 changed files with 27 additions and 30 deletions

View File

@ -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) { switch (passtype) {
case 0: case 0:
if (type == T1_TYPE_RAW) { if (type == T1_TYPE_RAW) {

View File

@ -21,9 +21,9 @@ cccccccccccccccccccccccccccccccc issue104_jpxstream.jp2_2.pgx
c74edbb49e132b2cfc1eaf7908197b17 issue134.jp2_0.pgx c74edbb49e132b2cfc1eaf7908197b17 issue134.jp2_0.pgx
16fe8ed450da10a6aaae4cf6f467fc21 issue134.jp2_1.pgx 16fe8ed450da10a6aaae4cf6f467fc21 issue134.jp2_1.pgx
c6091c07bf0ff221008dfb60d893cdff issue134.jp2_2.pgx c6091c07bf0ff221008dfb60d893cdff issue134.jp2_2.pgx
cccccccccccccccccccccccccccccccc issue135.j2k_0.pgx bee38bdc0dde1a891a8d9650f475db38 issue135.j2k_0.pgx
cccccccccccccccccccccccccccccccc issue135.j2k_1.pgx dbabd772b1e53959e1e1c4bdf58e0108 issue135.j2k_1.pgx
cccccccccccccccccccccccccccccccc issue135.j2k_2.pgx 65d5ed69d3c994f33d3a9d649ec6f1da issue135.j2k_2.pgx
aa7461b31e14641586803b23b7fb04f2 issue142.j2k_0.pgx aa7461b31e14641586803b23b7fb04f2 issue142.j2k_0.pgx
a809006e7a0c1eed68bc86c96af43fe3 issue142.j2k_1.pgx a809006e7a0c1eed68bc86c96af43fe3 issue142.j2k_1.pgx
74f7a7a194a74a947245b843c62c4054 issue142.j2k_2.pgx 74f7a7a194a74a947245b843c62c4054 issue142.j2k_2.pgx
@ -52,12 +52,12 @@ e58242abc2c6d44df187397c55e6fbff issue254.jp2_2.pgx
ce4e556aaa0844b92a92c35c200fc43e j2k32.j2k_1.pgx ce4e556aaa0844b92a92c35c200fc43e j2k32.j2k_1.pgx
ea926520f990640862f3fe6616097613 j2k32.j2k_2.pgx ea926520f990640862f3fe6616097613 j2k32.j2k_2.pgx
66b60e866991e03f9a2de18e80d3102b kakadu_v4-4_openjpegv2_broken.j2k_0.pgx 66b60e866991e03f9a2de18e80d3102b kakadu_v4-4_openjpegv2_broken.j2k_0.pgx
12a8a4668315d9ae27969991251ce85f kodak_2layers_lrcp.j2c_0.pgx bee38bdc0dde1a891a8d9650f475db38 kodak_2layers_lrcp.j2c_0.pgx
56d0b0c547d6d5bb12f0c36e88722b11 kodak_2layers_lrcp.j2c_1.pgx dbabd772b1e53959e1e1c4bdf58e0108 kodak_2layers_lrcp.j2c_1.pgx
48ba092fb40090c160bbd08bdf7bdbf2 kodak_2layers_lrcp.j2c_2.pgx 65d5ed69d3c994f33d3a9d649ec6f1da kodak_2layers_lrcp.j2c_2.pgx
12a8a4668315d9ae27969991251ce85f kodak_2layers_lrcp-l2.j2c_0.pgx bee38bdc0dde1a891a8d9650f475db38 kodak_2layers_lrcp-l2.j2c_0.pgx
56d0b0c547d6d5bb12f0c36e88722b11 kodak_2layers_lrcp-l2.j2c_1.pgx dbabd772b1e53959e1e1c4bdf58e0108 kodak_2layers_lrcp-l2.j2c_1.pgx
48ba092fb40090c160bbd08bdf7bdbf2 kodak_2layers_lrcp-l2.j2c_2.pgx 65d5ed69d3c994f33d3a9d649ec6f1da kodak_2layers_lrcp-l2.j2c_2.pgx
05c062aca83d13b8095460f38a690a08 MarkerIsNotCompliant.j2k_0.pgx 05c062aca83d13b8095460f38a690a08 MarkerIsNotCompliant.j2k_0.pgx
ff73d2bd32951d9e55b02186aac24aff Marrin.jp2_0.pgx ff73d2bd32951d9e55b02186aac24aff Marrin.jp2_0.pgx
55ce884dd2346af6a5172a434ee578fa Marrin.jp2_1.pgx 55ce884dd2346af6a5172a434ee578fa Marrin.jp2_1.pgx
@ -148,7 +148,7 @@ c494419005e8aae82f46d3f48da6caf1 p1_06.j2k.png
6ae110e1fb5a869af3dbc5fbc735b0bd relax.jp2_0.pgx 6ae110e1fb5a869af3dbc5fbc735b0bd relax.jp2_0.pgx
518a8f28dacc034982507f43763b88dd relax.jp2_1.pgx 518a8f28dacc034982507f43763b88dd relax.jp2_1.pgx
c678b04f4d3e59b9d66a8bce37c553c0 relax.jp2_2.pgx c678b04f4d3e59b9d66a8bce37c553c0 relax.jp2_2.pgx
cdb1d69eb48ffd8545751326b86d9d7e test_lossless.j2k_0.pgx 1090301e16fcfdecf3419bccad61cdeb test_lossless.j2k_0.pgx
efc9c7f21a542a7888a9eeb73b0f7092 text_GBR.jp2_0.pgx efc9c7f21a542a7888a9eeb73b0f7092 text_GBR.jp2_0.pgx
54790b332b3dcbda28e1bcb31270b946 text_GBR.jp2_1.pgx 54790b332b3dcbda28e1bcb31270b946 text_GBR.jp2_1.pgx
d9bcbdc818febb8c0a6bc5f940a4ea85 text_GBR.jp2_2.pgx d9bcbdc818febb8c0a6bc5f940a4ea85 text_GBR.jp2_2.pgx
@ -163,7 +163,7 @@ a73bec4d6d82c8a64203e8fdf893b86d issue428.jp2_0.pgx
8b96a253937c4c7dd6b41b4aa11367d9 issue414.jp2_2.pgx 8b96a253937c4c7dd6b41b4aa11367d9 issue414.jp2_2.pgx
ec6886229ffaeaddfe22ce02b7a75e15 issue414.jp2_3.pgx ec6886229ffaeaddfe22ce02b7a75e15 issue414.jp2_3.pgx
6aa5c69c83d6f4d5d65968f34f9bc2a3 issue414.jp2_4.pgx 6aa5c69c83d6f4d5d65968f34f9bc2a3 issue414.jp2_4.pgx
00f34217ad2f88f4d4e1c5cd0d2c4329 issue399.j2k_0.pgx 296038e047bb6aaf0e6652cb1b301e60 issue399.j2k_0.pgx
d8fb69def2a48a3686483c4353544f4b issue411-ycc444.jp2_0.pgx d8fb69def2a48a3686483c4353544f4b issue411-ycc444.jp2_0.pgx
d2911f75ed1758057f9b1bf26bcb2400 issue411-ycc444.jp2_1.pgx d2911f75ed1758057f9b1bf26bcb2400 issue411-ycc444.jp2_1.pgx
f7c23ee589ceda07ffb77a83018606cc issue411-ycc444.jp2_2.pgx f7c23ee589ceda07ffb77a83018606cc issue411-ycc444.jp2_2.pgx
@ -284,9 +284,9 @@ fc2844a9f3c8e924e349180ba9e122dd p0_14_png-2.png
0c1cc85c051dd95394d06103c8d9bbef p0_14_png-6.png 0c1cc85c051dd95394d06103c8d9bbef p0_14_png-6.png
230e4968cb445b222ee2095014ba1d26 p0_14_png-8.png 230e4968cb445b222ee2095014ba1d26 p0_14_png-8.png
5a6131ad9ea5d191ffcdf6435be89cb4 v4dwt_interleave_h.gsr105.j2k_0.pgx 5a6131ad9ea5d191ffcdf6435be89cb4 v4dwt_interleave_h.gsr105.j2k_0.pgx
4426ed46f75a45782c551d82818b9e60 dwt_interleave_h.gsr105.jp2_0.pgx 65e41ed91283b5e2f0c79ee1c867a86c dwt_interleave_h.gsr105.jp2_0.pgx
382e7297e062d729a7a7726e964f1a0a dwt_interleave_h.gsr105.jp2_1.pgx 8d7685f1569d446787476c0a56c93750 dwt_interleave_h.gsr105.jp2_1.pgx
64c1027db97421e348f823178b5d9c4b dwt_interleave_h.gsr105.jp2_2.pgx ddfff2ce2df4a9102518c92a362e6d25 dwt_interleave_h.gsr105.jp2_2.pgx
63bf755af5a1f8a478d65079dc7c8964 issue205-tif.jp2.tif 63bf755af5a1f8a478d65079dc7c8964 issue205-tif.jp2.tif
b01ed87dbac424bc820b2ac590e4884e issue236-ESYCC-CDEF.jp2_0.pgx b01ed87dbac424bc820b2ac590e4884e issue236-ESYCC-CDEF.jp2_0.pgx
2635cc00b1e18ef11adcba09e845d459 issue236-ESYCC-CDEF.jp2_1.pgx 2635cc00b1e18ef11adcba09e845d459 issue236-ESYCC-CDEF.jp2_1.pgx

View File

@ -21,8 +21,6 @@ NR-DEC-_00042.j2k-2-decode-md5
NR-DEC-buxI.j2k-9-decode-md5 NR-DEC-buxI.j2k-9-decode-md5
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
NR-DEC-Marrin.jp2-18-decode-md5 NR-DEC-Marrin.jp2-18-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-file409752.jp2-40-decode-md5 NR-DEC-file409752.jp2-40-decode-md5
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
NR-DEC-issue206_image-000.jp2-42-decode-md5 NR-DEC-issue206_image-000.jp2-42-decode-md5
@ -31,7 +29,6 @@ NR-DEC-issue228.j2k-60-decode-md5
NR-DEC-issue134.jp2-67-decode-md5 NR-DEC-issue134.jp2-67-decode-md5
NR-DEC-issue208.jp2-69-decode-md5 NR-DEC-issue208.jp2-69-decode-md5
NR-DEC-issue211.jp2-70-decode-md5 NR-DEC-issue211.jp2-70-decode-md5
NR-DEC-issue135.j2k-68-decode-md5
NR-DEC-issue414.jp2-110-decode-md5 NR-DEC-issue414.jp2-110-decode-md5
NR-DEC-p1_04.j2k-124-decode-md5 NR-DEC-p1_04.j2k-124-decode-md5
NR-DEC-p1_04.j2k-125-decode-md5 NR-DEC-p1_04.j2k-125-decode-md5
@ -51,3 +48,6 @@ NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
NR-DEC-p1_06.j2k-164-decode NR-DEC-p1_06.j2k-164-decode
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-issue135.j2k-68-decode-md5

View File

@ -21,8 +21,6 @@ NR-DEC-_00042.j2k-2-decode-md5
NR-DEC-buxI.j2k-9-decode-md5 NR-DEC-buxI.j2k-9-decode-md5
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
NR-DEC-Marrin.jp2-18-decode-md5 NR-DEC-Marrin.jp2-18-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-file409752.jp2-40-decode-md5 NR-DEC-file409752.jp2-40-decode-md5
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
NR-DEC-issue206_image-000.jp2-42-decode-md5 NR-DEC-issue206_image-000.jp2-42-decode-md5
@ -31,7 +29,6 @@ NR-DEC-issue228.j2k-60-decode-md5
NR-DEC-issue134.jp2-67-decode-md5 NR-DEC-issue134.jp2-67-decode-md5
NR-DEC-issue208.jp2-69-decode-md5 NR-DEC-issue208.jp2-69-decode-md5
NR-DEC-issue211.jp2-70-decode-md5 NR-DEC-issue211.jp2-70-decode-md5
NR-DEC-issue135.j2k-68-decode-md5
NR-DEC-issue414.jp2-110-decode-md5 NR-DEC-issue414.jp2-110-decode-md5
NR-DEC-p1_04.j2k-124-decode-md5 NR-DEC-p1_04.j2k-124-decode-md5
NR-DEC-p1_04.j2k-125-decode-md5 NR-DEC-p1_04.j2k-125-decode-md5
@ -51,3 +48,6 @@ NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
NR-DEC-p1_06.j2k-164-decode NR-DEC-p1_06.j2k-164-decode
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-issue135.j2k-68-decode-md5

View File

@ -15,8 +15,6 @@ NR-DEC-_00042.j2k-2-decode-md5
NR-DEC-buxI.j2k-9-decode-md5 NR-DEC-buxI.j2k-9-decode-md5
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
NR-DEC-Marrin.jp2-18-decode-md5 NR-DEC-Marrin.jp2-18-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-file409752.jp2-40-decode-md5 NR-DEC-file409752.jp2-40-decode-md5
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
NR-DEC-issue206_image-000.jp2-42-decode-md5 NR-DEC-issue206_image-000.jp2-42-decode-md5
@ -43,3 +41,6 @@ NR-DEC-issue205.jp2-253-decode-md5
NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5 NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-issue135.j2k-68-decode-md5

View File

@ -1,6 +1,5 @@
NR-DEC-p1_06.j2k-164-decode NR-DEC-p1_06.j2k-164-decode
NR-DEC-issue104_jpxstream.jp2-33-decode-md5 NR-DEC-issue104_jpxstream.jp2-33-decode-md5
NR-DEC-issue135.j2k-68-decode-md5
NR-DEC-issue226.j2k-74-decode-md5 NR-DEC-issue226.j2k-74-decode-md5
NR-DEC-p1_06.j2k-156-decode-md5 NR-DEC-p1_06.j2k-156-decode-md5
NR-DEC-p1_06.j2k-164-decode-md5 NR-DEC-p1_06.j2k-164-decode-md5

View File

@ -14,8 +14,6 @@ NR-DEC-_00042.j2k-2-decode-md5
NR-DEC-buxI.j2k-9-decode-md5 NR-DEC-buxI.j2k-9-decode-md5
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
NR-DEC-Marrin.jp2-18-decode-md5 NR-DEC-Marrin.jp2-18-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-file409752.jp2-40-decode-md5 NR-DEC-file409752.jp2-40-decode-md5
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
NR-DEC-issue206_image-000.jp2-42-decode-md5 NR-DEC-issue206_image-000.jp2-42-decode-md5
@ -44,3 +42,6 @@ NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
ETS-C1P0-p0_12.j2k-compare2ref ETS-C1P0-p0_12.j2k-compare2ref
NR-C1P0-p0_12.j2k-compare2base NR-C1P0-p0_12.j2k-compare2base
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
NR-DEC-issue135.j2k-68-decode-md5

View File

@ -1,5 +1,3 @@
NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
ETS-C1P0-p0_12.j2k-compare2ref ETS-C1P0-p0_12.j2k-compare2ref
NR-C1P0-p0_12.j2k-compare2base NR-C1P0-p0_12.j2k-compare2base

View File

@ -1,5 +1,3 @@
NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
ETS-C1P0-p0_12.j2k-compare2ref ETS-C1P0-p0_12.j2k-compare2ref
NR-C1P0-p0_12.j2k-compare2base NR-C1P0-p0_12.j2k-compare2base