diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-06-05 05:27:03 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-06 10:43:43 +0400 |
commit | 9aaaeba45c41cf2b3fa4100abbdee7437428f93c (patch) | |
tree | 805987ecb0483217bb795520618b106192cd217b /libavcodec/vorbis.h | |
parent | e46cf805b10070327026f8e2880fe29e5e9ac1af (diff) |
vorbis: Validate that the floor 1 X values contain no duplicates.
Duplicate values in this vector are explicitly banned by the Vorbis I spec
and cause divide-by-zero crashes later on.
(cherry picked from commit ecf79c4d3e8baaf2f303278ef81db6f8407656bc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec/vorbis.h')
-rw-r--r-- | libavcodec/vorbis.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h index a55523f17e..baa5af2c55 100644 --- a/libavcodec/vorbis.h +++ b/libavcodec/vorbis.h @@ -36,7 +36,8 @@ typedef struct { uint16_t high; } vorbis_floor1_entry; -void ff_vorbis_ready_floor1_list(vorbis_floor1_entry * list, int values); +int ff_vorbis_ready_floor1_list(AVCodecContext *avccontext, + vorbis_floor1_entry *list, int values); unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n); // x^(1/n) int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num); void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values, |