summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/j2k.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-07-26 19:49:38 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-07-26 19:49:38 +0200
commit8d2e69e37d01bf6a0440d3109d92235c3c586ffe (patch)
treed82d97a951b954b4598ff63184a8922d5f0fb47f /src/lib/openjp2/j2k.h
parent5c5319984b81e2aa32d1d83abdef0cdb8dbe7b18 (diff)
Fix assertion / memory leak in opj_j2k_merge_ppt() on corrupted images (#939)
Fixes issue on id:000020,sig:06,src:001958,op:flip4,pos:149 that has two SOT markers for the same tile with the same tile part number, causing opj_j2k_merge_ppt() to be called several times.
Diffstat (limited to 'src/lib/openjp2/j2k.h')
-rw-r--r--src/lib/openjp2/j2k.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.h b/src/lib/openjp2/j2k.h
index a968682e..7be11249 100644
--- a/src/lib/openjp2/j2k.h
+++ b/src/lib/openjp2/j2k.h
@@ -269,6 +269,8 @@ typedef struct opj_tcp {
OPJ_FLOAT32 distoratio[100];
/** tile-component coding parameters */
opj_tccp_t *tccps;
+ /** current tile part number or -1 if first time into this tile */
+ OPJ_INT32 m_current_tile_part_number;
/** number of tile parts for the tile. */
OPJ_UINT32 m_nb_tile_parts;
/** data for the tile */