From 7c66d24460a2b6b5984191dd31a5a4761cd62ab3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 17 Sep 2020 15:57:26 +0200 Subject: [PATCH] avcodec/svq1dec: use av_malloc_array() to allocate pmv --- libavcodec/svq1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 25bd3d0253..e67b460ae3 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);