diff options
Diffstat (limited to 'libavcodec/8svx.c')
-rw-r--r-- | libavcodec/8svx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index 3864d61857..5c68d347e2 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -121,6 +121,10 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si int buf_size = avpkt->size; int n = esc->samples_size; + if (buf_size < 2) { + av_log(avctx, AV_LOG_ERROR, "packet size is too small\n"); + return AVERROR(EINVAL); + } if (!(deinterleaved_samples = av_mallocz(n))) return AVERROR(ENOMEM); |