aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ivi_common.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2012-05-19 13:45:00 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-05-20 11:19:48 +0200
commit96037382210b5c1b0202647ac0ca196ce5de4487 (patch)
treef5c2199871ccfbe946d636b2726f556f358c5867 /libavcodec/ivi_common.c
parent23ba1503f2b11057c65052b4a07961236d8d69c7 (diff)
downloadffmpeg-96037382210b5c1b0202647ac0ca196ce5de4487.tar.gz
indeo: check that band output buffer exists
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r--libavcodec/ivi_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 0d773761ff..6979231b7d 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -641,6 +641,10 @@ static int decode_band(IVI45DecContext *ctx, int plane_num,
IVITile *tile;
band->buf = band->bufs[ctx->dst_buf];
+ if (!band->buf) {
+ av_log(avctx, AV_LOG_ERROR, "Band buffer points to no data!\n");
+ return AVERROR_INVALIDDATA;
+ }
band->ref_buf = band->bufs[ctx->ref_buf];
band->data_ptr = ctx->frame_data + (get_bits_count(&ctx->gb) >> 3);