提交 50b664c2 authored 作者: William King's avatar William King

Small off by one error. If the array is of size 144, then an index of 144 inclusive is an error.

上级 dfbc1757
......@@ -2146,7 +2146,7 @@ int WebRtcIsac_DecodePitchGain(Bitstr *streamdata, WebRtc_Word16 *PitchGains_Q12
*WebRtcIsac_kQPitchGainCdf_ptr = WebRtcIsac_kQPitchGainCdf;
err = WebRtcIsac_DecHistBisectMulti(&index_comb, streamdata, WebRtcIsac_kQPitchGainCdf_ptr, WebRtcIsac_kQCdfTableSizeGain, 1);
/* error check, Q_mean_Gain.. tables are of size 144 */
if ((err<0) || (index_comb<0) || (index_comb>144))
if ((err<0) || (index_comb<0) || (index_comb>143))
return -ISAC_RANGE_ERROR_DECODE_PITCH_GAIN;
/* unquantize back to pitch gains by table look-up */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论