1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

8svx: check packet size before reading the initial sample value.

This commit is contained in:
Justin Ruggles 2011-09-06 18:43:55 -04:00
parent e371878416
commit 0ac3b8fc4a

View File

@ -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;