Commit dadc1f5e authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c9c7d59b'

* commit 'c9c7d59b':
  tiff: Use av_mallocz_array

Conflicts:
	libavcodec/tiffenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 1e16492b c9c7d59b
......@@ -327,6 +327,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
offset = ptr;
bytestream_put_le32(&ptr, 0);
if (strips > INT_MAX / FFMAX(sizeof(s->strip_sizes[0]), sizeof(s->strip_offsets[0]))) {
ret = AVERROR(ENOMEM);
goto fail;
}
av_fast_padded_mallocz(&s->strip_sizes , &s->strip_sizes_size , sizeof(s->strip_sizes [0]) * strips);
av_fast_padded_mallocz(&s->strip_offsets, &s->strip_offsets_size, sizeof(s->strip_offsets[0]) * strips);
......
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