hq_hqa: Validate get_vlc2 return value

The `hq_ac_vlc.table` is incomplete, so unaccounted symbol return -1
as value.
pull/135/head
Luca Barbato 10 years ago
parent a78f5548d9
commit 28eddef689
  1. 5
      libavcodec/hq_hqa.c

@ -75,7 +75,10 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
}
for (;;) {
val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
if (val < 0)
return AVERROR_INVALIDDATA;
pos += ff_hq_ac_skips[val];
if (pos >= 64)
break;

Loading…
Cancel
Save