avformat/matroskadec: Use av_malloc_array() for index_entries

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-25 00:26:53 +01:00
parent c1cdce5dcb
commit a1062e1437
1 changed files with 1 additions and 1 deletions

View File

@ -3313,7 +3313,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s)
// store cue point timestamps as a comma separated list for checking subsegment alignment in
// the muxer. assumes that each timestamp cannot be more than 20 characters long.
buf = av_malloc(s->streams[0]->nb_index_entries * 20 * sizeof(char));
buf = av_malloc_array(s->streams[0]->nb_index_entries, 20 * sizeof(char));
if (!buf) return -1;
strcpy(buf, "");
for (i = 0; i < s->streams[0]->nb_index_entries; i++) {