diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-09-06 18:43:55 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-09-22 14:11:34 -0400 |
commit | 0ac3b8fc4aeb1755717f44482f3236134a5b8405 (patch) | |
tree | ff799b6136e7cd3a8731c20c5dcf49f9e51908ea /libavcodec | |
parent | e3718784160a5bfed8de9622afda19313ec7ca50 (diff) | |
download | ffmpeg-streaming-0ac3b8fc4aeb1755717f44482f3236134a5b8405.zip ffmpeg-streaming-0ac3b8fc4aeb1755717f44482f3236134a5b8405.tar.gz |
8svx: check packet size before reading the initial sample value.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/8svx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index adface2..0f53d39 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -74,6 +74,10 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si int consumed = buf_size; if(avctx->frame_number == 0) { + if (buf_size < 2) { + av_log(avctx, AV_LOG_ERROR, "packet size is too small\n"); + return AVERROR(EINVAL); + } esc->fib_acc = (int8_t)buf[1] + 128; buf_size -= 2; buf += 2; |