ffprobe: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 21 May 2014 13:59:22 +0000 (15:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 May 2014 13:59:22 +0000 (15:59 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe.c

index ad14fda..2380ee1 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2740,7 +2740,7 @@ static int parse_read_intervals(const char *intervals_spec)
             n++;
     n++;
 
             n++;
     n++;
 
-    read_intervals = av_malloc(n * sizeof(*read_intervals));
+    read_intervals = av_malloc_array(n, sizeof(*read_intervals));
     if (!read_intervals) {
         ret = AVERROR(ENOMEM);
         goto end;
     if (!read_intervals) {
         ret = AVERROR(ENOMEM);
         goto end;