diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-22 17:29:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-23 22:04:29 +0200 |
commit | fbdc98c758d5261d3328b53e29abeac033253358 (patch) | |
tree | 8a613e990efa291db627ef5f558b8e90667dcda0 /libavcodec | |
parent | 92f649b411eb2c4a064a00017a338f7de7a2ba86 (diff) | |
download | ffmpeg-streaming-fbdc98c758d5261d3328b53e29abeac033253358.zip ffmpeg-streaming-fbdc98c758d5261d3328b53e29abeac033253358.tar.gz |
avcodec/metasound_data: Fix inconsistency in tables
Fixes out of array read
This issue can be reproduced with:
Lucky.asf
teuflisch.asf
from http://samples.ffmpeg.org/A-codecs/VoxWare/
as well as other samples
fcb16m has 320 elements but the code before the patch can address a
table of 384 elements in its place.
I dont know if theres some elements missing, or its maybe the wrong
table, or if the parameters affecting the table size are wrong, or
if theres something else wrong.
if someone reading this has easy access to some reference. (binary
with the tables in it, spec, whatever, please contact us)
This solution fixes the inconsistency by padding the table with zeros,
this variant was suggested by Vitor Sessak. And ensures that nothing
currently working breaks.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/metasound_data.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/metasound_data.c b/libavcodec/metasound_data.c index 3465499..c6a8121 100644 --- a/libavcodec/metasound_data.c +++ b/libavcodec/metasound_data.c @@ -3741,6 +3741,14 @@ static const int16_t fcb16m[] = { -688, -209, 915, 622, -1038, -474, -343, -91, -173, -104, 255, 96, 1547, 773, -625, 2272, -90, -509, -527, -247, -147, -234, -45, 166, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, }; static const int16_t fcb44sl[] = { |