diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 0f53d39a8da8d7a28e8ba98785cb392e3b4cfb3c..af3b5fe7894f10bfa5aa1995360cc6939a262a92 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);