[FFmpeg-devel] [PATCH 1/2] avcodec/4xm: Check pre_gb in decode_i_block()

Paul B Mahol onemda at gmail.com
Wed Mar 10 20:31:55 EET 2021


while there fix style issue

On Wed, Mar 10, 2021 at 7:30 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> Fixes: Timeout
> Fixes:
> 31257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5150866229297152
>
> 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>
> ---
>  libavcodec/4xm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
> index 4d58b093f7..5e0f0c689c 100644
> --- a/libavcodec/4xm.c
> +++ b/libavcodec/4xm.c
> @@ -499,8 +499,8 @@ static int decode_i_block(FourXContext *f, int16_t
> *block)
>  {
>      int code, i, j, level, val;
>
> -    if (get_bits_left(&f->gb) < 2){
> -        av_log(f->avctx, AV_LOG_ERROR, "%d bits left before
> decode_i_block()\n", get_bits_left(&f->gb));
> +    if (get_bits_left(&f->pre_gb) < 2){
> +        av_log(f->avctx, AV_LOG_ERROR, "%d bits left before
> decode_i_block()\n", get_bits_left(&f->pre_gb));
>          return AVERROR_INVALIDDATA;
>      }
>
> --
> 2.17.1
>
> _______________________________________________
> 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