aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-14 14:19:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-14 14:19:38 +0100
commit2925571278bf09702564dfedd5e7731a112dd1f0 (patch)
tree1dfa146e870650d95ea52448caf8d150e10b7771
parent9f32048dd1967d7aa5421c490349a1056849cd78 (diff)
downloadffmpeg-2925571278bf09702564dfedd5e7731a112dd1f0.tar.gz
avcodec/mpegvideo_enc: Fix possibly exploitable security issue with -bf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo_enc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index fe83669e18..1a22fba5e9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -319,6 +319,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
if (avctx->max_b_frames > MAX_B_FRAMES) {
av_log(avctx, AV_LOG_ERROR, "Too many B-frames requested, maximum "
"is %d.\n", MAX_B_FRAMES);
+ avctx->max_b_frames = MAX_B_FRAMES;
}
s->max_b_frames = avctx->max_b_frames;
s->codec_id = avctx->codec->id;