diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-04-21 14:42:21 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-04-22 12:27:43 +0200 |
commit | 28eddef689f2b4843a84f7d05fd9614246f92cc4 (patch) | |
tree | 30c70fddd518f57d179d0e0e6b2a757e304779a2 /libavcodec/hq_hqa.c | |
parent | a78f5548d94f23ce23cece41edf0fe9d18926de6 (diff) | |
download | ffmpeg-28eddef689f2b4843a84f7d05fd9614246f92cc4.tar.gz |
hq_hqa: Validate get_vlc2 return value
The `hq_ac_vlc.table` is incomplete, so unaccounted symbol return -1
as value.
Diffstat (limited to 'libavcodec/hq_hqa.c')
-rw-r--r-- | libavcodec/hq_hqa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c index 4b18eaef78..ae378e6524 100644 --- a/libavcodec/hq_hqa.c +++ b/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; |