Fix for Divide-by-zero in ixheaacd_lpc_to_td
This changes handle the Divide-by-zero runtime error reported while calculating the gain because imaginary and real data were zero. Bug: ossFuzz:61788 Test: poc in bug
This commit is contained in:
parent
c07f14410b
commit
596d791059
1 changed files with 1 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ VOID ixheaacd_lpc_to_td(FLOAT32 *coeff, WORD32 order, FLOAT32 *gains, WORD32 lg)
|
|||
|
||||
for (i = 0; i < size_n / 2; i++) {
|
||||
gains[i] =
|
||||
(FLOAT32)(1.0f / sqrt(data_r[i] * data_r[i] + data_i[i] * data_i[i]));
|
||||
(FLOAT32)(1.0f / (sqrt(data_r[i] * data_r[i] + data_i[i] * data_i[i]) + FLT_EPSILON));
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue