[FFmpeg-cvslog] avcodec/mss12: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Sat Jan 17 13:30:13 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 17 13:01:26 2015 +0100| [f8ff76199c380146299b434fb56f51d49be90b1f] | committer: Michael Niedermayer

avcodec/mss12: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8ff76199c380146299b434fb56f51d49be90b1f
---

 libavcodec/mss12.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mss12.c b/libavcodec/mss12.c
index 7d54d29..6b58aa29 100644
--- a/libavcodec/mss12.c
+++ b/libavcodec/mss12.c
@@ -656,7 +656,7 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
                             (version ? 8 : 0) + i * 3);
 
     c->mask_stride = FFALIGN(avctx->width, 16);
-    c->mask        = av_malloc(c->mask_stride * avctx->height);
+    c->mask        = av_malloc_array(c->mask_stride, avctx->height);
     if (!c->mask) {
         av_log(avctx, AV_LOG_ERROR, "Cannot allocate mask plane\n");
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list