diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-11 13:18:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-11 13:18:41 +0200 |
commit | e0d8ff5ef105fb281323f05983b9d62f57ff4d35 (patch) | |
tree | 3c88020fa5c0f9233c0bf821326988b11e3253e9 /libavformat/nsvdec.c | |
parent | 7f64a7503b19b39f1251e4380987034c569bebf5 (diff) | |
download | ffmpeg-e0d8ff5ef105fb281323f05983b9d62f57ff4d35.tar.gz |
avformat/nsvdec: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nsvdec.c')
-rw-r--r-- | libavformat/nsvdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index 59b7938200..c9c0a740bf 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -346,7 +346,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) nsv->index_entries = table_entries_used; if((unsigned)table_entries_used >= UINT_MAX / sizeof(uint32_t)) return -1; - nsv->nsvs_file_offset = av_malloc((unsigned)table_entries_used * sizeof(uint32_t)); + nsv->nsvs_file_offset = av_malloc_array((unsigned)table_entries_used, sizeof(uint32_t)); if (!nsv->nsvs_file_offset) return AVERROR(ENOMEM); @@ -355,7 +355,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) if(table_entries > table_entries_used && avio_rl32(pb) == MKTAG('T','O','C','2')) { - nsv->nsvs_timestamps = av_malloc((unsigned)table_entries_used*sizeof(uint32_t)); + nsv->nsvs_timestamps = av_malloc_array((unsigned)table_entries_used, sizeof(uint32_t)); if (!nsv->nsvs_timestamps) return AVERROR(ENOMEM); for(i=0;i<table_entries_used;i++) { |