Browse Source

8svx: log an error message if output buffer is too small

Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
tags/n0.9
Justin Ruggles 13 years ago
parent
commit
fda459cee7
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/8svx.c

+ 4
- 1
libavcodec/8svx.c View File

@@ -83,8 +83,11 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si
buf += 2; buf += 2;
} }


if (*data_size < buf_size * 2)
if (*data_size < buf_size * 2) {
av_log(avctx, AV_LOG_ERROR, "Provided buffer with size %d is too small.\n",
*data_size);
return AVERROR(EINVAL); return AVERROR(EINVAL);
}


delta_decode(out_data, buf, buf_size, &esc->fib_acc, esc->table); delta_decode(out_data, buf, buf_size, &esc->fib_acc, esc->table);




Loading…
Cancel
Save