Commit 17776638 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato

opus: Fix typo causing overflow in silk_stabilize_lsf

Due to this typo max_center can be too large, causing nlsf to be set to
too large values, which in turn can cause nlsf[i - 1] + min_delta[i] to
overflow to a negative value, which is not allowed for nlsf and can
cause an out of bounds read in silk_lsf2lpc.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 90b1b935
......@@ -824,7 +824,7 @@ static inline void silk_stabilize_lsf(int16_t nlsf[16], int order, const uint16_
/* upper extent */
for (i = order; i > k; i--)
max_center -= min_delta[k];
max_center -= min_delta[i];
max_center -= min_delta[k] >> 1;
/* move apart */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment