Commit d92a8c6a authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 997: Decoder crashed when decoding an OSBA bitstream

parent 3facce7f
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -354,6 +354,14 @@ static void ivas_iir_2_filter_fx(

            filter_state->state_fx[stage][j - 1] = BASOP_Util_Add_Mant32Exp( L_tmp, L_tmp_e, L_negate( L_tmp_prod ), L_prod_e, &filter_state->state_e[stage][j - 1] ); // Q31 - filter_state->state_e[stage][j - 1]
            move32();
            /*In case when exponent is less than -31 the value is very small and negligible hence resetting it to zero to avoid exponent overflow*/
            IF( LT_16( filter_state->state_e[stage][j - 1], -31 ) )
            {
                filter_state->state_fx[stage][j - 1] = 0;
                move32();
                filter_state->state_e[stage][j - 1] = 0;
                move16();
            }
        }
    }
}