summaryrefslogtreecommitdiff
path: root/libavcodec/g723_1_data.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-11-23 17:10:51 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-11-30 10:58:45 -0500
commitb74b88f30da2389f333a31815d8326d5576d3331 (patch)
tree3c909c8a8f0871764d6449e14ddd72dedaec7456 /libavcodec/g723_1_data.h
parenta0fa6d06b848f26b16ba12f0a9a4a85b93ab8022 (diff)
g723_1: Handle values at the ends of the table in lsp2lpc()
Fixes out of array reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/g723_1_data.h')
-rw-r--r--libavcodec/g723_1_data.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h
index 04f8a06e37..c4c4d77a62 100644
--- a/libavcodec/g723_1_data.h
+++ b/libavcodec/g723_1_data.h
@@ -56,7 +56,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,
@@ -121,6 +121,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
};
/* LSP VQ tables */