[FFmpeg-devel] [PATCH 5/8] avformat/vividas: Fix infinite loop in header parser

Paul B Mahol onemda at gmail.com
Sun Aug 11 12:04:32 EEST 2019


LGTM

On Sat, Aug 10, 2019 at 11:18 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> Fixes: Timeout (Infinite -> Finite)
> Fixes:
> 16010/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5638616102993920
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by
> <https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by>:
> Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavformat/vividas.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/vividas.c b/libavformat/vividas.c
> index e70c9164a1..a5f33181de 100644
> --- a/libavformat/vividas.c
> +++ b/libavformat/vividas.c
> @@ -546,6 +546,9 @@ static int viv_read_header(AVFormatContext *s)
>              break;
>
>          block_len = ffio_read_varlen(pb);
> +        if (avio_feof(pb))
> +            return AVERROR_INVALIDDATA;
> +
>          block_type = avio_r8(pb);
>
>          if (block_type == 22) {
> --
> 2.22.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