diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-07-10 13:15:57 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-07-10 16:20:40 +0200 |
commit | c9eb5c9751c88caaed62af5ffe908fe545022e7e (patch) | |
tree | 9f3393f9d191516dffb83ea7322690079cb9c25e | |
parent | 2e6338b47276bf66fc470a44e8c23a8e57daf07f (diff) | |
download | ffmpeg-c9eb5c9751c88caaed62af5ffe908fe545022e7e.tar.gz |
lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
-rw-r--r-- | libavformat/utils.c | 2 |
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); |