aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/apedec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-21 00:07:46 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-01-26 18:37:12 +0100
commit59a6becf8ecb1ea25faaeaaf45f4d28de39606eb (patch)
tree1b1b2ab07c726476ce070735c61db95337a8f2e6 /libavcodec/apedec.c
parent5dd95670808915b391348624d3f9860e021a81a2 (diff)
downloadffmpeg-59a6becf8ecb1ea25faaeaaf45f4d28de39606eb.tar.gz
avcodec/apedec: Use FFABSU() in do_apply_filter()
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 29053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4814432697974784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r--libavcodec/apedec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 8fe7b5ee86..388d851d03 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1333,7 +1333,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
/* Version 3.98 and later files */
/* Update the adaption coefficients */
- absres = FFABS(res);
+ absres = FFABSU(res);
if (absres)
*f->adaptcoeffs = APESIGN(res) *
(8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3)));