Module: libav
Branch: master
Commit: b4cda0a999facbddacb95861a67ff61074edc39b

Author:    Federico Tomassetti <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Sat Feb 14 16:14:51 2015 +0000

ogg: check memory allocations

Bug-Id: CID 1257795
CC: [email protected]

Signed-off-by: Luca Barbato <[email protected]>

---

 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))

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to