Commit 3662e251 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/asfenc: Check for index_ptr allocation failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d6bb8238
......@@ -652,6 +652,8 @@ static int asf_write_header(AVFormatContext *s)
asf->nb_packets = 0;
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
if (!asf->index_ptr)
return AVERROR(ENOMEM);
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
asf->maximum_packet = 0;
......
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