opus_silk: fix typo causing overflow in silk_stabilize_lsf
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Tue, 15 Dec 2015 21:00:31 +0000 (22:00 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 20 Dec 2015 15:13:19 +0000 (16:13 +0100)
commit7a26ea7a7e67cff8c1f3367e4f505f1c650ca0f5
treea8ae627dd7bfa9804a6f6dfdb620552c1a86236e
parent6fc3f6f43b24b98a768acc28f03fec37ef1a79e3
opus_silk: 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.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f61d44b74aaae1d306d8a0d38b7b3d4292c89ced)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/opus_silk.c