1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

tiff: Use av_mallocz_array

CC: libav-stable@libav.org
This commit is contained in:
Luca Barbato 2014-11-09 15:11:26 +01:00 committed by Vittorio Giovara
parent c6074a30ba
commit c9c7d59b7d

View File

@ -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;