aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-16 19:41:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-16 19:41:41 +0200
commitdd77f6469a898a5c00e2b9b3ff8093db05006ce9 (patch)
tree8a8f4718ee33996cf7fc93ca3da13749fd95b660 /libavformat
parent11b36b1ee051e53c815114f8c258e23166ea9ed1 (diff)
downloadffmpeg-dd77f6469a898a5c00e2b9b3ff8093db05006ce9.tar.gz
avformat/ico: use avmalloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/icodec.c2
-rw-r--r--libavformat/icoenc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 4c038e9614..847f0eea2f 100644
--- a/libavformat/icodec.c
+++ b/libavformat/icodec.c
@@ -58,7 +58,7 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 4);
ico->nb_images = avio_rl16(pb);
- ico->images = av_malloc(ico->nb_images * sizeof(IcoImage));
+ ico->images = av_malloc_array(ico->nb_images, sizeof(IcoImage));
if (!ico->images)
return AVERROR(ENOMEM);
diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c
index 561c6cadcc..dcf906513a 100644
--- a/libavformat/icoenc.c
+++ b/libavformat/icoenc.c
@@ -101,7 +101,7 @@ static int ico_write_header(AVFormatContext *s)
avio_skip(pb, 16);
}
- ico->images = av_mallocz(ico->nb_images * sizeof(IcoMuxContext));
+ ico->images = av_mallocz_array(ico->nb_images, sizeof(IcoMuxContext));
if (!ico->images)
return AVERROR(ENOMEM);