[FFmpeg-cvslog] oggparsetheora: check av_mallocz result

Anton Khirnov git at videolan.org
Wed Oct 30 10:53:14 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 09:36:12 2013 +0100| [4f2d8968c04ef76bb18df103a1287b864c0e6fe6] | committer: Anton Khirnov

oggparsetheora: check av_mallocz result

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

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

diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 3d5785b..961096e 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -50,6 +50,8 @@ static int theora_header(AVFormatContext *s, int idx)
 
     if (!thp) {
         thp = av_mallocz(sizeof(*thp));
+        if (!thp)
+            return AVERROR(ENOMEM);
         os->private = thp;
     }
 



More information about the ffmpeg-cvslog mailing list