diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-23 22:57:12 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-23 22:57:16 +0300 |
commit | 400810abee8fdf1a58ea852065b08e8ce1ca70c4 (patch) | |
tree | 054b9c56995e7171230ac448af6399fa3a283e4e /libavcodec/hq_hqa.c | |
parent | b112e25dde39a86befaed7e294facd8d860322da (diff) | |
parent | 28eddef689f2b4843a84f7d05fd9614246f92cc4 (diff) |
Merge commit '28eddef689f2b4843a84f7d05fd9614246f92cc4'
* commit '28eddef689f2b4843a84f7d05fd9614246f92cc4':
hq_hqa: Validate get_vlc2 return value
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 388c63e4fa..7d14e2755b 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; |