[FFmpeg-cvslog] avformat/segafilm: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Sun Apr 12 17:15:00 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 12 16:52:00 2015 +0200| [870ec3f69e04e04d1efd33bd7e8cc439de1f766e] | committer: Michael Niedermayer

avformat/segafilm: Use av_malloc_array()

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

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

 libavformat/segafilm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index f8b3eee..44fa683 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -199,7 +199,7 @@ static int film_read_header(AVFormatContext *s)
     film->sample_count = AV_RB32(&scratch[12]);
     if(film->sample_count >= UINT_MAX / sizeof(film_sample))
         return -1;
-    film->sample_table = av_malloc(film->sample_count * sizeof(film_sample));
+    film->sample_table = av_malloc_array(film->sample_count, sizeof(film_sample));
     if (!film->sample_table)
         return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list