tools/ismindex.c: Use av_realloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 20:08:20 +0000 (21:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 20:08:33 +0000 (21:08 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tools/ismindex.c

index d6386ac..47a148c 100644 (file)
@@ -532,8 +532,9 @@ static int handle_file(struct Tracks *tracks, const char *file, int split,
             err = AVERROR(ENOMEM);
             goto fail;
         }
-        temp = av_realloc(tracks->tracks,
-                          sizeof(*tracks->tracks) * (tracks->nb_tracks + 1));
+        temp = av_realloc_array(tracks->tracks,
+                                tracks->nb_tracks + 1,
+                                sizeof(*tracks->tracks));
         if (!temp) {
             av_free(track);
             err = AVERROR(ENOMEM);