History

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

Michael Niedermayer committed 5 years ago

Commit 59a6bec1 parent 5dd95671 file · +1 −1Browse files

Showing the changes to libavcodec/apedec.c (1 of 1 file). Show all

Unified · Split

libavcodec/apedec.c+1−1
@@ -1333,7 +1333,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f, · 1332 unmodified lines
1333 /* Version 3.98 and later files */1333 /* Version 3.98 and later files */
1334 1334
1335 /* Update the adaption coefficients */1335 /* Update the adaption coefficients */
1336 absres = FFABS(res);1336 absres = FFABSU(res);
1337 if (absres)1337 if (absres)
1338 *f->adaptcoeffs = APESIGN(res) *1338 *f->adaptcoeffs = APESIGN(res) *
1339 (8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3)));1339 (8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3)));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t