Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a3d233 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix more potential (benign) AMRWB overflows

Bug: 25843966
Change-Id: I18003aa20be1ff0a93473ecd8b4995861bed8c89
parent 9f6cffe4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -608,6 +608,7 @@ static_vo Word32 L_add (Word32 L_var1, Word32 L_var2)
|___________________________________________________________________________|
*/

__attribute__((no_sanitize("integer")))
static_vo Word32 L_sub (Word32 L_var1, Word32 L_var2)
{
    Word32 L_var_out;
+3 −2
Original line number Diff line number Diff line
@@ -33,12 +33,13 @@ void Updt_tar(
         )
{
    Word32 i;
    Word32 L_tmp;
    Word32 L_tmp, L_tmp2;

    for (i = 0; i < L; i++)
    {
        L_tmp = x[i] << 15;
        L_tmp -= (y[i] * gain)<<1;
        L_tmp2 = L_mult(y[i], gain);
        L_tmp = L_sub(L_tmp, L_tmp2);
        x2[i] = extract_h(L_shl2(L_tmp, 1));
    }