History

avcodec/aacdec_template: Fix undefined signed interger operations

Fixed: signed integer overflow: -2 * -1085502286 cannot be represented in type 'int' Fixed: 57986/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5123651145170944

Michael Niedermayer committed 3 years ago

Commit 87f76d31 parent 40cec0b1 file · +2 −2Browse files

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

Unified · Split

libavcodec/aacdec_template.c+2−2
@@ -2856,8 +2856,8 @@ static void imdct_and_windowing_eld(AACContext *ac, SingleChannelElement *sce) · 2855 unmodified lines
28562856 ac->mdct512_fn(ac->mdct512, buf, in, sizeof(INTFLOAT));
28572857
28582858 for (i = 0; i < n; i+=2) {
2859− buf[i + 0] = -(USE_FIXED + 1)*buf[i + 0];
2860− buf[i + 1] = (USE_FIXED + 1)*buf[i + 1];
2859+ buf[i + 0] = -(int)(USE_FIXED + 1U)*buf[i + 0];
2860+ buf[i + 1] = (int)(USE_FIXED + 1U)*buf[i + 1];
28612861 }
28622862 // Like with the regular IMDCT at this point we still have the middle half
28632863 // of a transform but with even symmetry on the left and odd symmetry on

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