diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-02-22 17:51:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-02-28 20:11:03 +0100 |
commit | f01d522cf36d5f6810887bb70d24036778b6ea07 (patch) | |
tree | 6d3c9d9ba8cb67e6b1f08b92657d669894e7c8a7 | |
parent | 30724384298ae939871891f838755708709a45aa (diff) | |
download | ffmpeg-f01d522cf36d5f6810887bb70d24036778b6ea07.tar.gz |
avcodec/dxtory: Fix undefined shift with negative linesize
Fixes: left shift of negative value -128
Fixes: 30746/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5906271469436928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/dxtory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c index 7143a11e2e..f314bcec75 100644 --- a/libavcodec/dxtory.c +++ b/libavcodec/dxtory.c @@ -264,8 +264,8 @@ static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic, V[huvborder] = src[3] + 0x80; src += 4; } - Y1 += pic->linesize[0] << 1; - Y2 += pic->linesize[0] << 1; + Y1 += pic->linesize[0] * 2; + Y2 += pic->linesize[0] * 2; U += pic->linesize[1]; V += pic->linesize[2]; } |