oggparsespeex: Fix unchecked malloc
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sun, 22 Nov 2015 18:12:09 +0000 (18:12 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 23 Nov 2015 09:44:07 +0000 (10:44 +0100)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/oggparsespeex.c

index f7af794..3cc9012 100644 (file)
@@ -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;
     }