vima: check packet size before initializing bitstream reader
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
06f5edc9be
commit
857797bc14
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user