summaryrefslogtreecommitdiff
path: root/libavformat/mms.c
diff options
context:
space:
mode:
authorFederico Tomassetti <federico@tomassetti.me>2015-03-21 10:44:58 +0000
committerLuca Barbato <lu_zero@gentoo.org>2015-03-21 23:18:15 +0100
commit93c1b04abfc0dd31211a18bf2c0041d69cd16919 (patch)
treef9e2f5213716438fc5781887b936d2987418eef8 /libavformat/mms.c
parentd450cb07d91ef39ad1d39bd7ca0cfce4bd7b13e7 (diff)
mms: Check memory allocation
Bug-Id: CID 1258462 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/mms.c')
-rw-r--r--libavformat/mms.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mms.c b/libavformat/mms.c
index fb16a3c9ef..92de81d768 100644
--- a/libavformat/mms.c
+++ b/libavformat/mms.c
@@ -104,6 +104,8 @@ int ff_mms_asf_header_parser(MMSContext *mms)
mms->streams = av_fast_realloc(mms->streams,
&mms->nb_streams_allocated,
(mms->stream_num + 1) * sizeof(MMSStream));
+ if (!mms->streams)
+ return AVERROR(ENOMEM);
mms->streams[mms->stream_num].id = stream_id;
mms->stream_num++;
} else {