summaryrefslogtreecommitdiff
path: root/libavformat/oggparsespeex.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2015-11-22 18:12:09 +0000
committerLuca Barbato <lu_zero@gentoo.org>2015-11-23 10:44:07 +0100
commitc8fa647811371885be421a84a2388529857fed23 (patch)
treef91524673e5bc5374fcd4d26577d7894bbb45730 /libavformat/oggparsespeex.c
parentafdff8008149515afebf9992eae84be7d76e6b1e (diff)
oggparsespeex: Fix unchecked malloc
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/oggparsespeex.c')
-rw-r--r--libavformat/oggparsespeex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index f7af79418f..3cc901299c 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;
}