diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index 0d773761ff1fe2c3a0ef83fcc6306db63d7fc0fc..6979231b7dd532b9a1baae923c7acebd910909c3 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);