[FFmpeg-cvslog] oggparsespeex: Fix unchecked malloc

Derek Buitenhuis git at videolan.org
Sun Nov 29 15:29:52 CET 2015


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Sun Nov 22 18:12:09 2015 +0000| [c8fa647811371885be421a84a2388529857fed23] | committer: Luca Barbato

oggparsespeex: Fix unchecked malloc

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

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

diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index f7af794..3cc9012 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -47,6 +47,8 @@ static int speex_header(AVFormatContext *s, int idx) {
 
     if (!spxp) {
         spxp = av_mallocz(sizeof(*spxp));
+        if (!spxp)
+            return AVERROR(ENOMEM);
         os->private = spxp;
     }
 



More information about the ffmpeg-cvslog mailing list