Browse Source

avformat/ape: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 11 years ago
parent
commit
f289422a3e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/ape.c

+ 1
- 1
libavformat/ape.c View File

@@ -268,7 +268,7 @@ static int ape_read_header(AVFormatContext * s)
ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);
return AVERROR_INVALIDDATA;
}
ape->frames = av_malloc(ape->totalframes * sizeof(APEFrame));
ape->frames = av_malloc_array(ape->totalframes, sizeof(APEFrame));
if(!ape->frames)
return AVERROR(ENOMEM);
ape->firstframe = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength;


Loading…
Cancel
Save