From b4cda0a999facbddacb95861a67ff61074edc39b Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Sat, 14 Feb 2015 16:14:51 +0000 Subject: [PATCH] ogg: check memory allocations Bug-Id: CID 1257795 CC: libav-stable@libav.org Signed-off-by: Luca Barbato --- libavformat/oggenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 70c7817fa8..8f8a08f1bd 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -444,6 +444,8 @@ 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 (!(s->flags & AVFMT_FLAG_BITEXACT))