[FFmpeg-cvslog] lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
Carl Eugen Hoyos
git at videolan.org
Wed Jul 10 20:24:11 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Jul 10 13:15:57 2013 +0200| [c9eb5c9751c88caaed62af5ffe908fe545022e7e] | committer: Carl Eugen Hoyos
lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9eb5c9751c88caaed62af5ffe908fe545022e7e
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f607be7..77f04f1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2857,6 +2857,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if (!st->info->duration_error)
st->info->duration_error = av_mallocz(sizeof(st->info->duration_error[0])*2);
+ if (!st->info->duration_error)
+ return AVERROR(ENOMEM);
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// av_log(NULL, AV_LOG_ERROR, "%f\n", dts);
More information about the ffmpeg-cvslog
mailing list