sonic: make sure num_taps * channels is not larger than frame_size
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Tue, 15 Dec 2015 22:43:03 +0000 (23:43 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 20 Dec 2015 15:13:23 +0000 (16:13 +0100)
commit465dd4bc941e96abc00e60e35947673d64d34907
treefeef561506660808122fe460f1e16e0ee7c4fd12
parent7a26ea7a7e67cff8c1f3367e4f505f1c650ca0f5
sonic: make sure num_taps * channels is not larger than frame_size

If that is the case, the loop setting predictor_state in
sonic_decode_frame causes out of bounds reads of int_samples, which has
only frame_size number of elements.

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