[FFmpeg-cvslog] mms: Check memory allocation

Federico Tomassetti git at videolan.org
Sun Mar 22 04:01:11 CET 2015


ffmpeg | branch: master | Federico Tomassetti <federico at tomassetti.me> | Sat Mar 21 10:44:58 2015 +0000| [93c1b04abfc0dd31211a18bf2c0041d69cd16919] | committer: Luca Barbato

mms: Check memory allocation

Bug-Id: CID 1258462

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93c1b04abfc0dd31211a18bf2c0041d69cd16919
---

 libavformat/mms.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mms.c b/libavformat/mms.c
index fb16a3c..92de81d 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 {



More information about the ffmpeg-cvslog mailing list