aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-10 13:15:57 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-10 16:20:40 +0200
commitc9eb5c9751c88caaed62af5ffe908fe545022e7e (patch)
tree9f3393f9d191516dffb83ea7322690079cb9c25e
parent2e6338b47276bf66fc470a44e8c23a8e57daf07f (diff)
downloadffmpeg-c9eb5c9751c88caaed62af5ffe908fe545022e7e.tar.gz
lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
-rw-r--r--libavformat/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f607be789d..77f04f1114 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);