diff options
author | David Conrad <lessen42@gmail.com> | 2010-06-04 22:41:06 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-06-04 22:41:06 +0000 |
commit | d06735a34a053160adbf1ae7f83e340c1628f2bf (patch) | |
tree | 208806966dc0eb4f83ee657c28e3fb7cfa55fb51 /libavformat/matroskaenc.c | |
parent | 1f4280e744f2f0f97d4677df336a90f290f852da (diff) | |
download | ffmpeg-d06735a34a053160adbf1ae7f83e340c1628f2bf.tar.gz |
matroskaenc: Check that tracks was allocated
Originally committed as revision 23477 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 6166edf8e1..6bc10050c4 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -703,6 +703,8 @@ static int mkv_write_header(AVFormatContext *s) av_lfg_init(&mkv->lfg, av_get_random_seed()); mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks)); + if (!mkv->tracks) + return AVERROR(ENOMEM); ebml_header = start_ebml_master(pb, EBML_ID_HEADER, 0); put_ebml_uint (pb, EBML_ID_EBMLVERSION , 1); |