Commit dd77f646 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/ico: use avmalloc(z)_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 11b36b1e
......@@ -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);
......
......@@ -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);
......
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