Module: libav
Branch: master
Commit: c8fa647811371885be421a84a2388529857fed23

Author:    Derek Buitenhuis <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Sun Nov 22 18:12:09 2015 +0000

oggparsespeex: Fix unchecked malloc

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

---

 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;
     }
 

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

Reply via email to