summaryrefslogtreecommitdiff
path: root/libavcodec/indeo4.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-23 04:18:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-23 04:29:41 +0100
commitc0a99eae296177b22387fab8921d079088d8a54b (patch)
tree4e415639ea7ce739f3932e02eaafcb95180ce975 /libavcodec/indeo4.c
parentf927c5b753f2ec1f037ad38cb55b4407dd7a9d79 (diff)
indeo4: check band->scan
Fixes null ptr exception Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r--libavcodec/indeo4.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 8ba8e25d15..df80b1139e 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -444,6 +444,11 @@ static int decode_band_hdr(IVI4DecContext *ctx, IVIBandDesc *band,
align_get_bits(&ctx->gb);
+ if (!band->scan) {
+ av_log(avctx, AV_LOG_ERROR, "band->scan not set\n");
+ return AVERROR_INVALIDDATA;
+ }
+
return 0;
}