[FFmpeg-devel] [PATCH 3/6] avcodec/dxtory: Fix negative shift in dx2_decode_slice_410()

Paul B Mahol onemda at gmail.com
Sat Sep 26 10:40:43 EEST 2020


On Sat, Sep 26, 2020 at 12:26:35AM +0200, Michael Niedermayer wrote:
> Fixes: left shift of negative value -768
> Fixes: 25574/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-6012596027916288
> 
> 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/dxtory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

lgtm

> 
> diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
> index a82532c467..bc95e0e7e1 100644
> --- a/libavcodec/dxtory.c
> +++ b/libavcodec/dxtory.c
> @@ -637,7 +637,7 @@ static int dx2_decode_slice_410(GetBitContext *gb, AVFrame *frame,
>              V[huvborder] = decode_sym(gb, lru[2]) ^ 0x80;
>          }
>  
> -        Y += ystride << 2;
> +        Y += ystride * 4;
>          U += ustride;
>          V += vstride;
>      }
> -- 
> 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