summaryrefslogtreecommitdiffstats
path: root/libavcodec/motionpixels.c
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2012-06-09 21:13:58 +0200
committerMichael Niedermayer <[email protected]>2012-06-09 21:13:58 +0200
commit796039ad3807da88a443050fa16da313be3ce250 (patch)
treea2a6d4e183557321e15d9726c15d569234caa10c /libavcodec/motionpixels.c
parenta56b07b5dc4fdacbb038a9fc9d51e6b98e6d12d8 (diff)
parent858c3158b58eafee2fedd9d83651c06aa57ef217 (diff)
Merge branch 'release/0.8' into release/0.7
* release/0.8: Update for 0.8.12 mpc8: fix channel checks h263: disable loop filter with lowres wmv1: check that the input buffer is large enough yopdec: check frame oddness to be within supported limits yopdec: check that palette fits in the packet 8svx: fix crash binkaudio: check number of channels indeo5: check quant_mat truemotion1: Check index, fix out of array read iff: check if there is extradata ape: Fix null ptr dereference with files missing a seekatable. 4xm: fix division by zero caused by bps<8 jvdec: check videosize motionpixels: check extradata size iff_ilbm: fix null ptr deref yop: check for missing extradata xan: fix out of array read cdgraphics: Fix out of array write Conflicts: Doxyfile RELEASE VERSION Merged-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavcodec/motionpixels.c')
-rw-r--r--libavcodec/motionpixels.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index aa398c9592..1806e4703d 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -55,6 +55,11 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
int w4 = (avctx->width + 3) & ~3;
int h4 = (avctx->height + 3) & ~3;
+ if(avctx->extradata_size < 2){
+ av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
+ return AVERROR_INVALIDDATA;
+ }
+
motionpixels_tableinit();
mp->avctx = avctx;
dsputil_init(&mp->dsp, avctx);