ffmpeg | branch: master | Michael Niedermayer <[email protected]> | 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 <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>

> 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];
     }

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to