From: Paul B Mahol Date: Thu, 17 Sep 2020 13:57:26 +0000 (+0200) Subject: avcodec/svq1dec: use av_malloc_array() to allocate pmv X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7c66d24460a2b6b5984191dd31a5a4761cd62ab3;p=ffmpeg avcodec/svq1dec: use av_malloc_array() to allocate pmv --- diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 25bd3d0253d..e67b460ae31 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -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);