diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-07 22:29:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-07 22:29:54 +0200 |
commit | 3662e251cbe0edc05cd03349a606a06f3bb96eda (patch) | |
tree | 352fd39be9f1d03b422942e55d7a44ef50d9a4ce | |
parent | d6bb82387c1232a5e84650b979d46477fb9693db (diff) | |
download | ffmpeg-3662e251cbe0edc05cd03349a606a06f3bb96eda.tar.gz |
avformat/asfenc: Check for index_ptr allocation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/asfenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index 5e0f7b05c7..015c731cec 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -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; |