Browse Source

smacker: sanity check audio size.

Fixes, excessive memory allocation
Fixes Ticket1892

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
57c0da6fe4
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/smacker.c

+ 5
- 0
libavcodec/smacker.c View File

@@ -608,6 +608,11 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,

unp_size = AV_RL32(buf);

if (unp_size > (1U<<24)) {
av_log(avctx, AV_LOG_ERROR, "packet is too big\n");
return AVERROR_INVALIDDATA;
}

init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);

if(!get_bits1(&gb)){


Loading…
Cancel
Save