aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:37:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-03 01:38:03 +0200
commit69db5f2779f84c8070e505cf2a26a3d46728a6db (patch)
tree916c53d2abb47bd1a5e58fb46031d17ce8375ebd
parent97a5b4ba53a10aa8c5ecf2ccf18c61e6724bebd3 (diff)
parent7f33a24e824c6d20cb941e6b20c5382becfbc923 (diff)
downloadffmpeg-69db5f2779f84c8070e505cf2a26a3d46728a6db.tar.gz
Merge commit '7f33a24e824c6d20cb941e6b20c5382becfbc923' into release/0.10
* commit '7f33a24e824c6d20cb941e6b20c5382becfbc923': h264: check that execute_decode_slices() is not called too many times Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 48e0b94436..1bd3628763 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3831,6 +3831,12 @@ static int execute_decode_slices(H264Context *h, int context_count){
H264Context *hx;
int i;
+ if (s->mb_y >= s->mb_height) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Input contains more MB rows than the frame height.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
return 0;
if(context_count == 1) {