]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/svq1dec: use av_malloc_array() to allocate pmv
authorPaul B Mahol <onemda@gmail.com>
Thu, 17 Sep 2020 13:57:26 +0000 (15:57 +0200)
committerPaul B Mahol <onemda@gmail.com>
Thu, 17 Sep 2020 17:23:11 +0000 (19:23 +0200)
libavcodec/svq1dec.c

index 25bd3d0253da17eb2f69882a4a68be91b4a23c46..e67b460ae31a8cde9e836dc843830fea553dd357 100644 (file)
@@ -679,7 +679,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
     if (result < 0)
         return result;
 
-    pmv = av_malloc((FFALIGN(s->width, 16) / 8 + 3) * sizeof(*pmv));
+    pmv = av_malloc_array(FFALIGN(s->width, 16) / 8 + 3, sizeof(*pmv));
     if (!pmv)
         return AVERROR(ENOMEM);