summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:37:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:59:52 +0200
commitbbf43c70dd43482a94aef3ebcb767830069bd1c0 (patch)
tree59aabc5fd6c9a6c63f246f905bcb3280e89e811e /libavcodec
parent234f76ae7debf2e9b057acff88125a7762f8741f (diff)
jpeg2000dec: assert that curtileno is valid when used
Fixes CID1026755 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 5c8db96b59..c7519c12d8 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -25,6 +25,7 @@
* JPEG 2000 image decoder
*/
+#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "avcodec.h"
@@ -1230,6 +1231,7 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
break;
case JPEG2000_SOT:
if (!(ret = get_sot(s, len))) {
+ av_assert1(s->curtileno >= 0);
codsty = s->tile[s->curtileno].codsty;
qntsty = s->tile[s->curtileno].qntsty;
properties = s->tile[s->curtileno].properties;