aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ra144dec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-14 14:24:59 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-10 11:38:58 -0400
commitcadd4d332a48d37d0248eafe955050f4f7d08eb5 (patch)
treea8b36e1c0480cc18c804411b7d8a07cc52d814c4 /libavcodec/ra144dec.c
parent80bdf7e0b7975956c42f17589cb21a5531f179ef (diff)
downloadffmpeg-cadd4d332a48d37d0248eafe955050f4f7d08eb5.tar.gz
ra144dec: log an error message when output buffer is too small.
also return AVERROR(EINVAL) instead of -1.
Diffstat (limited to 'libavcodec/ra144dec.c')
-rw-r--r--libavcodec/ra144dec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index 6707601643..f026e24ccd 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -72,8 +72,10 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
GetBitContext gb;
out_size = NBLOCKS * BLOCKSIZE * av_get_bytes_per_sample(avctx->sample_fmt);
- if (*data_size < out_size)
- return -1;
+ if (*data_size < out_size) {
+ av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n");
+ return AVERROR(EINVAL);
+ }
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,