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
288 shift = a00.exp;288 shift = a00.exp;
289 if (shift >= 3)289 if (shift >= 3)
290 alpha0[k][0] = 0x7fffffff;290 alpha0[k][0] = 0x7fffffff;
291 else if (shift <= -30)
292 alpha0[k][0] = 0;
291 else {293 else {
292 a00.mant *= 2;294 a00.mant *= 2;
293 shift = 2-shift;295 shift = 2-shift;
@@ -302,6 +304,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 8 unmodified lines
302 shift = a01.exp;304 shift = a01.exp;
303 if (shift >= 3)305 if (shift >= 3)
304 alpha0[k][1] = 0x7fffffff;306 alpha0[k][1] = 0x7fffffff;
307 else if (shift <= -30)
308 alpha0[k][1] = 0;
305 else {309 else {
306 a01.mant *= 2;310 a01.mant *= 2;
307 shift = 2-shift;311 shift = 2-shift;
@@ -315,6 +319,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 7 unmodified lines
315 shift = a10.exp;319 shift = a10.exp;
316 if (shift >= 3)320 if (shift >= 3)
317 alpha1[k][0] = 0x7fffffff;321 alpha1[k][0] = 0x7fffffff;
322 else if (shift <= -30)
323 alpha1[k][0] = 0;
318 else {324 else {
319 a10.mant *= 2;325 a10.mant *= 2;
320 shift = 2-shift;326 shift = 2-shift;
@@ -329,6 +335,8 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 8 unmodified lines
329 shift = a11.exp;335 shift = a11.exp;
330 if (shift >= 3)336 if (shift >= 3)
331 alpha1[k][1] = 0x7fffffff;337 alpha1[k][1] = 0x7fffffff;
338 else if (shift <= -30)
339 alpha1[k][1] = 0;
332 else {340 else {
333 a11.mant *= 2;341 a11.mant *= 2;
334 shift = 2-shift;342 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