diff options
author | Paul B Mahol | 2012-09-30 15:14:28 +0000 |
---|---|---|
committer | Paul B Mahol | 2012-09-30 17:29:37 +0000 |
commit | 857797bc1455468f9d70565ac087c3f57d8e67ff (patch) | |
tree | 99943da139b2832d0df842dc75b24c0f59dc6f31 /libavcodec | |
parent | 06f5edc9be7be0654e91ddf16b5c2242208b3602 (diff) |
vima: check packet size before initializing bitstream reader
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vima.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vima.c b/libavcodec/vima.c index 30051985c0..648ae55016 100644 --- a/libavcodec/vima.c +++ b/libavcodec/vima.c @@ -141,11 +141,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int8_t channel_hint[2]; int ret, chan, channels = 1; - init_get_bits(&gb, pkt->data, pkt->size * 8); - if (pkt->size < 13) return AVERROR_INVALIDDATA; + init_get_bits(&gb, pkt->data, pkt->size * 8); + samples = get_bits_long(&gb, 32); if (samples == 0xffffffff) { skip_bits_long(&gb, 32); |