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

Commit bc8c47e1 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix overflow in amrwbenc

This got dropped in a previous merge.

Change-Id: Ic5ec1f6662944deee32e740697fc55774c894033
parent 5d5c3a13
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,9 @@ void Preemph2(
            L_tmp = INT32_MAX / 2;
            L_tmp = INT32_MAX / 2;
        }
        }
        L_tmp = (L_tmp << 1);
        L_tmp = (L_tmp << 1);
        if (L_tmp > INT32_MAX - 0x8000) {
            L_tmp = INT32_MAX - 0x8000;
        }
        x[i] = (L_tmp + 0x8000)>>16;
        x[i] = (L_tmp + 0x8000)>>16;
    }
    }