[FFmpeg-cvslog] avformat/ape: Use av_malloc_array()
Michael Niedermayer
git at videolan.org
Tue Apr 7 22:56:32 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 7 22:50:07 2015 +0200| [f289422a3ea53db13f6072b5ae97e6fa2e3b7b09] | committer: Michael Niedermayer
avformat/ape: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f289422a3ea53db13f6072b5ae97e6fa2e3b7b09
---
libavformat/ape.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 28f73d3..69b001a 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list