mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-06 07:20:54 +00:00
qdm2: fix out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7d74aaf698
commit
fe91becc2d
1 changed files with 6 additions and 3 deletions
|
@ -884,9 +884,12 @@ static int synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int le
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
if (BITS_LEFT(length,gb) >= 4)
|
if (BITS_LEFT(length,gb) >= 4) {
|
||||||
samples[0] = type30_dequant[qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1)];
|
unsigned v = qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1);
|
||||||
else
|
if (v >= FF_ARRAY_ELEMS(type30_dequant))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
samples[0] = type30_dequant[v];
|
||||||
|
} else
|
||||||
samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
|
samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
|
||||||
|
|
||||||
run = 1;
|
run = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue