Commit c9c7d59b authored by Luca Barbato's avatar Luca Barbato Committed by Vittorio Giovara

tiff: Use av_mallocz_array

CC: libav-stable@libav.org
parent c6074a30
...@@ -312,8 +312,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -312,8 +312,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
offset = ptr; offset = ptr;
bytestream_put_le32(&ptr, 0); bytestream_put_le32(&ptr, 0);
strip_sizes = av_mallocz(sizeof(*strip_sizes) * strips); strip_sizes = av_mallocz_array(strips, sizeof(*strip_sizes));
strip_offsets = av_mallocz(sizeof(*strip_offsets) * strips); strip_offsets = av_mallocz_array(strips, sizeof(*strip_offsets));
if (!strip_sizes || !strip_offsets) { if (!strip_sizes || !strip_offsets) {
ret = AVERROR(ENOMEM); ret = AVERROR(ENOMEM);
goto fail; goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment