[FFmpeg-cvslog] avcodec/dxtory: Fix undefined shift with negative linesize
Michael Niedermayer
git at videolan.org
Sun Feb 28 21:11:14 EET 2021
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Feb 22 17:51:56 2021 +0100| [f01d522cf36d5f6810887bb70d24036778b6ea07] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f01d522cf36d5f6810887bb70d24036778b6ea07
---
libavcodec/dxtory.c | 4 ++--
1 file 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];
}
More information about the ffmpeg-cvslog
mailing list