]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/8svx.c
prores: only call get_buffer once per frame
[ffmpeg] / libavcodec / 8svx.c
index 3864d61857e908cca02e24365ec8b1523c6c607e..5c68d347e24bf680739c48514bd9bca43e406345 100644 (file)
@@ -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);