summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-14 15:57:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-14 16:05:12 +0100
commit3c5c6b9d61361eae3eb989ad8aeca80f0fc05a63 (patch)
tree1ebac491e229ac9bc174ab0f87334200b426eaa6 /libavcodec
parentbe26232efa9543106bfc16f45831f69abaf1c552 (diff)
parentdeabb52ab4c1fdb3dd319f3980b1489a182011f1 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: ivi_common: check that scan pattern is set before using it. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ivi_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 677c33d78f..504f60f526 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -467,6 +467,11 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
}
if (cbp & 1) { /* block coded ? */
+ if (!band->scan) {
+ av_log(avctx, AV_LOG_ERROR, "Scan pattern is not set.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
scan_pos = -1;
memset(trvec, 0, num_coeffs*sizeof(trvec[0])); /* zero transform vector */
memset(col_flags, 0, sizeof(col_flags)); /* zero column flags */