[FFmpeg-cvslog] avcodec/svq1dec: use av_malloc_array() to allocate pmv
Paul B Mahol
git at videolan.org
Thu Sep 17 20:24:08 EEST 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 17 15:57:26 2020 +0200| [7c66d24460a2b6b5984191dd31a5a4761cd62ab3] | committer: Paul B Mahol
avcodec/svq1dec: use av_malloc_array() to allocate pmv
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c66d24460a2b6b5984191dd31a5a4761cd62ab3
---
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);
More information about the ffmpeg-cvslog
mailing list