[FFmpeg-cvslog] tiff: Use av_mallocz_array
Luca Barbato
git at videolan.org
Wed Nov 12 00:20:30 CET 2014
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Nov 9 15:11:26 2014 +0100| [c9c7d59b7d26f0328d612995dd9256337ae1cbfb] | committer: Vittorio Giovara
tiff: Use av_mallocz_array
CC: libav-stable at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9c7d59b7d26f0328d612995dd9256337ae1cbfb
---
libavcodec/tiffenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 93c151e..b28f72b 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -312,8 +312,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
offset = ptr;
bytestream_put_le32(&ptr, 0);
- strip_sizes = av_mallocz(sizeof(*strip_sizes) * strips);
- strip_offsets = av_mallocz(sizeof(*strip_offsets) * strips);
+ strip_sizes = av_mallocz_array(strips, sizeof(*strip_sizes));
+ strip_offsets = av_mallocz_array(strips, sizeof(*strip_offsets));
if (!strip_sizes || !strip_offsets) {
ret = AVERROR(ENOMEM);
goto fail;
More information about the ffmpeg-cvslog
mailing list