diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 17:56:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 20:05:00 +0100 |
commit | 14db3af4f26dad8e6ddf2147e96ccc710952ad4d (patch) | |
tree | 89de2019c342c97443c1c195c010ab49862c0ce2 /libavcodec/qdm2.c | |
parent | 1fbf7165d59907a0632f8b72664a31f97f218656 (diff) | |
download | ffmpeg-14db3af4f26dad8e6ddf2147e96ccc710952ad4d.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>
Diffstat (limited to 'libavcodec/qdm2.c')
-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 fe785af3db..a057c1e0b4 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1329,7 +1329,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; |