[FFmpeg-cvslog] ogg: check memory allocations

Federico Tomassetti git at videolan.org
Sun Feb 15 21:41:51 CET 2015


ffmpeg | branch: master | Federico Tomassetti <f.tomassetti at gmail.com> | Sat Feb 14 16:14:51 2015 +0000| [b4cda0a999facbddacb95861a67ff61074edc39b] | committer: Luca Barbato

ogg: check memory allocations

Bug-Id: CID 1257795
CC: libav-stable at libav.org

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4cda0a999facbddacb95861a67ff61074edc39b
---

 libavformat/oggenc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 70c7817..8f8a08f 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))



More information about the ffmpeg-cvslog mailing list