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

Commit a27e70cd authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Ray Essick
Browse files

AMRWB: Add bounds check for mode in pvDecoder_AmrWb()

Bug: 151845676
Test: poc in bug

Change-Id: Iec7793ea8701da36efae9d4e163bfb91f74fc994
parent 02d69c15
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -337,7 +337,10 @@ int32 pvDecoder_AmrWb(
    st = (Decoder_State *) spd_state;

    /* mode verification */

    if (mode < 0 || mode >= NUM_OF_MODES)
    {
        return (-1);
    }
    nb_bits = AMR_WB_COMPRESSED[mode];

    *frame_length = AMR_WB_PCM_FRAME;