aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-08-05 14:35:55 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-09-04 21:45:51 +0200
commit283bf5c35bc5ac92e061f27c3a680318175a1600 (patch)
treeaee624ef52a3d7eab5e51275ce0183a05bcff2eb /libavcodec/tta.c
parent182aef0198d72d7c9a57a88bbb5b035e829920d1 (diff)
downloadffmpeg-283bf5c35bc5ac92e061f27c3a680318175a1600.tar.gz
avcodec/tta: fix signed overflow in decorrelate
Fixes: signed integer overflow: 2079654542 - -139267653 cannot be represented in type 'int' Fixes: 60811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5915858409750528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index f5e39df98d..7763ed7ffc 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -342,7 +342,7 @@ static int tta_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (s->channels > 1) {
int32_t *r = p - 1;
for (*p += *r / 2; r > (int32_t*)p - s->channels; r--)
- *r = *(r + 1) - *r;
+ *r = *(r + 1) - (unsigned)*r;
}
cur_chan = 0;
i++;