Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-26 22:19:13 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 14:33:44 +0300
commit221afdfc91a6bd90e69473c32da5383b5474a280 (patch)
tree80d47d949feae835588785f1653490627059750a /libavcodec
parent6085934f8f1f584be985dbc5ad12a47fa929ffd5 (diff)
avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr()
Fixes: signed integer overflow: -717241856 + -1434459904 cannot be represented in type 'int' Fixes: 21405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5677143666458624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e9a4c4fe9918220be492a4a9d74c2293fd706be3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/wmalosslessdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 22596bd5f8..8eb473e3ba 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -793,8 +793,8 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size)
else if (s->is_channel_coded[0] || s->is_channel_coded[1]) {
int icoef;
for (icoef = 0; icoef < tile_size; icoef++) {
- s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1;
- s->channel_residues[1][icoef] += s->channel_residues[0][icoef];
+ s->channel_residues[0][icoef] -= (unsigned)(s->channel_residues[1][icoef] >> 1);
+ s->channel_residues[1][icoef] += (unsigned) s->channel_residues[0][icoef];
}
}
}