summaryrefslogtreecommitdiff
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r--libavcodec/ra288.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index f14c28dc8d..2166d8ca61 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -181,8 +181,10 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
out_size = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME *
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);
+ }
init_get_bits(&gb, buf, avctx->block_align * 8);