Commit 857797bc authored by Paul B Mahol's avatar Paul B Mahol

vima: check packet size before initializing bitstream reader

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 06f5edc9
...@@ -141,11 +141,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, ...@@ -141,11 +141,11 @@ static int decode_frame(AVCodecContext *avctx, void *data,
int8_t channel_hint[2]; int8_t channel_hint[2];
int ret, chan, channels = 1; int ret, chan, channels = 1;
init_get_bits(&gb, pkt->data, pkt->size * 8);
if (pkt->size < 13) if (pkt->size < 13)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
init_get_bits(&gb, pkt->data, pkt->size * 8);
samples = get_bits_long(&gb, 32); samples = get_bits_long(&gb, 32);
if (samples == 0xffffffff) { if (samples == 0xffffffff) {
skip_bits_long(&gb, 32); skip_bits_long(&gb, 32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment