summaryrefslogtreecommitdiff
path: root/libavcodec/hq_hqa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hq_hqa.c')
-rw-r--r--libavcodec/hq_hqa.c5
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;