diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 17:56:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-21 21:59:45 +0100 |
commit | 2c8ac664561a1843f299295443720ce83105c024 (patch) | |
tree | 8f20fc2d35e7bffaa88beb19a7089991d7cd89c9 | |
parent | 4f209fe9606a4fb73f2f10d9106a8e990dac3b8d (diff) | |
download | ffmpeg-2c8ac664561a1843f299295443720ce83105c024.tar.gz |
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>
(cherry picked from commit 8120a1d9bd4bcc4434b4f588f50c9d81aa8ad0e0)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/qdm2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 69be061350..3aef7a36e2 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1351,7 +1351,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; |