[PATCH] oggenc: check return value of av_mallocz()
Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/oggenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 4398b20..4ba6940 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)) -- 1.8.3.2
On Fri, Apr 04, 2014 at 03:19:59AM -0300, James Almer wrote:
Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/oggenc.c | 3 +++ 1 file changed, 3 insertions(+)
applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf
participants (2)
-
James Almer -
Michael Niedermayer