summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_fixed.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-05-25 22:06:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-05-27 23:10:12 +0200
commit90475db97e2e5931d295df6ab86519fa2e14d259 (patch)
tree63363bd663364d064d661a8f07c04ecdbe8c3cd0 /libavcodec/aacdec_fixed.c
parent62cb6fadf33de6db386deac92853d4b95c930015 (diff)
downloadffmpeg-streaming-90475db97e2e5931d295df6ab86519fa2e14d259.zip
ffmpeg-streaming-90475db97e2e5931d295df6ab86519fa2e14d259.tar.gz
avcodec/aacdec_fixed: use 64bit to avoid overflow in rounding in apply_dependent_coupling_fixed()
Fixes: signed integer overflow: -2141499320 + -14469590 cannot be represented in type 'int' Fixes: 7351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6351214791884800 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/aacdec_fixed.c')
-rw-r--r--libavcodec/aacdec_fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index 5c3613e..167f5b6 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -385,7 +385,7 @@ static void apply_dependent_coupling_fixed(AACContext *ac,
for (k = offsets[i]; k < offsets[i + 1]; k++) {
tmp = (int)(((int64_t)src[group * 128 + k] * c + \
(int64_t)0x1000000000) >> 37);
- dest[group * 128 + k] += (tmp + round) >> shift;
+ dest[group * 128 + k] += (tmp + (int64_t)round) >> shift;
}
}
}
OpenPOWER on IntegriCloud