History

avcodec/aacsbr_fixed: Fix multiple runtime error: shift exponent 150 is too large for 32-bit type 'int'

Fixes: 1681/clusterfuzz-testcase-minimized-5970545365483520

Michael Niedermayer committed 9 years ago

Commit 3fb104f1 parent 2ccd2c91 file · +8 −0Browse files

Unified · Split

libavcodec/aacsbr_fixed.c+8−0
@@ -288,6 +288,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 287 unmodified lines
288288 shift = a00.exp;
289289 if (shift >= 3)
290290 alpha0[k][0] = 0x7fffffff;
291+ else if (shift <= -30)
292+ alpha0[k][0] = 0;
291293 else {
292294 a00.mant *= 2;
293295 shift = 2-shift;
@@ -302,6 +304,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 8 unmodified lines
302304 shift = a01.exp;
303305 if (shift >= 3)
304306 alpha0[k][1] = 0x7fffffff;
307+ else if (shift <= -30)
308+ alpha0[k][1] = 0;
305309 else {
306310 a01.mant *= 2;
307311 shift = 2-shift;
@@ -315,6 +319,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 7 unmodified lines
315319 shift = a10.exp;
316320 if (shift >= 3)
317321 alpha1[k][0] = 0x7fffffff;
322+ else if (shift <= -30)
323+ alpha1[k][0] = 0;
318324 else {
319325 a10.mant *= 2;
320326 shift = 2-shift;
@@ -329,6 +335,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 8 unmodified lines
329335 shift = a11.exp;
330336 if (shift >= 3)
331337 alpha1[k][1] = 0x7fffffff;
338+ else if (shift <= -30)
339+ alpha1[k][1] = 0;
332340 else {
333341 a11.mant *= 2;
334342 shift = 2-shift;

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