aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Tomassetti <f.tomassetti@gmail.com>2015-02-14 16:14:51 +0000
committerLuca Barbato <lu_zero@gentoo.org>2015-02-15 18:20:54 +0100
commitb4cda0a999facbddacb95861a67ff61074edc39b (patch)
treecdca07aedfd3e388313b5ecb211ed351de5f3a32
parent53367b34e1156614e82ef7af888928f322566f88 (diff)
downloadffmpeg-b4cda0a999facbddacb95861a67ff61074edc39b.tar.gz
ogg: check memory allocations
Bug-Id: CID 1257795 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavformat/oggenc.c2
1 files changed, 2 insertions, 0 deletions
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))