summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-22 03:52:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-22 03:52:37 +0100
commitc75681aba343912c8878705448ad470a1bba2191 (patch)
tree4f5d1aa5463d36407097eb046d76fd3b0126f56f
parenta821617b5a09321a4ff875f77ad95daf6942c0d1 (diff)
parent93c1b04abfc0dd31211a18bf2c0041d69cd16919 (diff)
downloadffmpeg-streaming-c75681aba343912c8878705448ad470a1bba2191.zip
ffmpeg-streaming-c75681aba343912c8878705448ad470a1bba2191.tar.gz
Merge commit '93c1b04abfc0dd31211a18bf2c0041d69cd16919'
* commit '93c1b04abfc0dd31211a18bf2c0041d69cd16919': mms: Check memory allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mms.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mms.c b/libavformat/mms.c
index 7e60b3b..807aade 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 {
OpenPOWER on IntegriCloud