diff --git a/tools/ismindex.c b/tools/ismindex.c index d6386ac17d..47a148ccf6 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -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);