Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-18 20:56:24 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-19 00:05:12 +0400
commit8120a1d9bd4bcc4434b4f588f50c9d81aa8ad0e0 (patch)
treead7a56ae1b7cd08b13925f5864efad1ab9e17e57 /libavcodec
parent211a107208ee636da81d2a89592181e2d78a0c8c (diff)
qdm2dec: check remaining input bits in the mainloop of qdm2_fft_decode_tones()
This is neccessary but likely not sufficient to prevent out of array reads. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 14db3af4f26dad8e6ddf2147e96ccc710952ad4d) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qdm2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 144ce98042..3aa9e5b6c3 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1327,7 +1327,7 @@ static void qdm2_fft_decode_tones (QDM2Context *q, int duration, GetBitContext *
local_int_10 = 1 << (q->group_order - duration - 1);
offset = 1;
- while (1) {
+ while (get_bits_left(gb)>0) {
if (q->superblocktype_2_3) {
while ((n = qdm2_get_vlc(gb, &vlc_tab_fft_tone_offset[local_int_8], 1, 2)) < 2) {
offset = 1;