jpeg2000dec: Support 4 tile parts
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 6 Jun 2013 01:01:17 +0000 (03:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 6 Jun 2013 01:10:42 +0000 (03:10 +0200)
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index c4b63ef..4968036 100644 (file)
@@ -54,7 +54,7 @@ typedef struct Jpeg2000Tile {
     uint8_t             properties[4];
     Jpeg2000CodingStyle codsty[4];
     Jpeg2000QuantStyle  qntsty[4];
-    Jpeg2000TilePart    tile_part[3];
+    Jpeg2000TilePart    tile_part[4];
     uint16_t tp_idx;                    // Tile-part index
 } Jpeg2000Tile;