[FFmpeg-devel] [PATCH 1/2] avcodec/mvha: Check remaining space when reading VLC table probabilities
Paul B Mahol
onemda at gmail.com
Fri Dec 6 01:37:36 EET 2019
LGTM
On 12/6/19, Michael Niedermayer <michael at niedermayer.cc> wrote:
> Fixes: Infinite loop
> Fixes:
> 19183/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5666216765292544
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/mvha.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c
> index 4b03a79283..c270063b1c 100644
> --- a/libavcodec/mvha.c
> +++ b/libavcodec/mvha.c
> @@ -203,6 +203,9 @@ static int decode_frame(AVCodecContext *avctx,
> for (int i = 0; i < s->nb_symbols; symbol++) {
> int prob;
>
> + if (get_bits_left(gb) < 4)
> + return AVERROR_INVALIDDATA;
> +
> if (get_bits1(gb)) {
> prob = get_bits(gb, 12);
> } else {
> --
> 2.23.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list