[FFmpeg-cvslog] mvi: check av_mallocz() result

Paul B Mahol git at videolan.org
Sat Dec 1 11:28:32 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Dec  1 09:03:24 2012 +0000| [b912895d94fd13c57ac2390b442a6f72a29f768c] | committer: Paul B Mahol

mvi: check av_mallocz() result

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 6ab95b9..9184927 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -54,6 +54,8 @@ static int read_header(AVFormatContext *s)
 
     vst->codec->extradata_size = 2;
     vst->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
+    if (!vst->codec->extradata)
+        return AVERROR(ENOMEM);
 
     version                  = avio_r8(pb);
     vst->codec->extradata[0] = avio_r8(pb);



More information about the ffmpeg-cvslog mailing list