diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 21:25:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 21:36:44 +0100 |
commit | 6535d81d8788a6eb758dd08330d4915c224fa5ee (patch) | |
tree | 4bdbfa3396f6a44237a4b9a54da90d0e822b7ec2 /libavcodec/g723_1_data.h | |
parent | 2207ea44fb4fad4d47646a789bc244e3e84c1726 (diff) | |
download | ffmpeg-6535d81d8788a6eb758dd08330d4915c224fa5ee.tar.gz |
g723_1dec: Fix lsp2lpc() so it can handle values at the ends of the table.
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/g723_1_data.h')
-rw-r--r-- | libavcodec/g723_1_data.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h index 8ee4a91841..38a6c59985 100644 --- a/libavcodec/g723_1_data.h +++ b/libavcodec/g723_1_data.h @@ -128,7 +128,7 @@ static const int16_t dc_lsp[LPC_ORDER] = { /** * Cosine table scaled by 2^14 */ -static const int16_t cos_tab[COS_TBL_SIZE] = { +static const int16_t cos_tab[COS_TBL_SIZE+1] = { 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324, 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107, 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736, @@ -193,6 +193,7 @@ static const int16_t cos_tab[COS_TBL_SIZE] = { 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029, 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284, 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383, + 16384 }; /** |