mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/mpegvideo_enc: Clip bits_per_raw_sample within valid range
Fixes out of array read
Fixes: test_case-mdc.264 (b47be15a120979f5a1a945c938cbef33)
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 13f266b50c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3fb97a01ce
commit
36861557a7
@ -342,6 +342,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
||||
break;
|
||||
}
|
||||
|
||||
avctx->bits_per_raw_sample = av_clip(avctx->bits_per_raw_sample, 0, 8);
|
||||
s->bit_rate = avctx->bit_rate;
|
||||
s->width = avctx->width;
|
||||
s->height = avctx->height;
|
||||
|
Loading…
Reference in New Issue
Block a user