diff options
author | James Almer <jamrial@gmail.com> | 2014-04-04 03:19:59 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-04 15:56:52 +0200 |
commit | 0f629823355680802320ee7be52af7f4e1b3e0b3 (patch) | |
tree | ce743e37122df316de564e9f0a374c2754727a6d | |
parent | 35617366b581da3e4bbd0557a8fa164ba8406968 (diff) | |
download | ffmpeg-0f629823355680802320ee7be52af7f4e1b3e0b3.tar.gz |
oggenc: check return value of av_mallocz()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/oggenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 4398b20a7c..4ba6940d10 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -427,6 +427,9 @@ static int ogg_write_header(AVFormatContext *s) return -1; } oggstream = av_mallocz(sizeof(*oggstream)); + if (!oggstream) + return AVERROR(ENOMEM); + oggstream->page.stream_index = i; if (!(st->codec->flags & CODEC_FLAG_BITEXACT)) |