[FFmpeg-cvslog] avcodec/dxtory: Fix negative shift in dxtory_decode_v1_410()
Michael Niedermayer
git at videolan.org
Sat Sep 26 21:35:07 EEST 2020
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 25 17:15:29 2020 +0200| [c3d1c7f903892455161fa1f722e01a7eaf2c6451] | committer: Michael Niedermayer
avcodec/dxtory: Fix negative shift in dxtory_decode_v1_410()
Fixes: left shift of negative value -256
Fixes: 25460/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5073252341514240
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=c3d1c7f903892455161fa1f722e01a7eaf2c6451
---
libavcodec/dxtory.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index 157e4b3ed2..a82532c467 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -177,10 +177,10 @@ static int dxtory_decode_v1_410(AVCodecContext *avctx, AVFrame *pic,
V[huvborder] = src[1] + 0x80;
src += 2;
}
- Y1 += pic->linesize[0] << 2;
- Y2 += pic->linesize[0] << 2;
- Y3 += pic->linesize[0] << 2;
- Y4 += pic->linesize[0] << 2;
+ Y1 += pic->linesize[0] * 4;
+ Y2 += pic->linesize[0] * 4;
+ Y3 += pic->linesize[0] * 4;
+ Y4 += pic->linesize[0] * 4;
U += pic->linesize[1];
V += pic->linesize[2];
}
More information about the ffmpeg-cvslog
mailing list