From fda459cee7a4227c34dfbc5dca1427c00d0d792e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 6 Sep 2011 18:49:07 -0400 Subject: 8svx: log an error message if output buffer is too small Based on a patch by Stefano Sabatini. git.videolan.org/ffmpeg.git commit e280a4da2ae6fd44f0079358ecc5aa08e388a5ed --- libavcodec/8svx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavcodec/8svx.c') diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index 0f53d39a8d..af3b5fe789 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -83,8 +83,11 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si 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); + } delta_decode(out_data, buf, buf_size, &esc->fib_acc, esc->table); -- cgit v1.2.3