diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-07-10 13:15:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-11 12:06:56 +0200 |
commit | fc3dec8b626f8c00fb89d1e66fdfbe9a021ca604 (patch) | |
tree | 1e62bb41e245a46f18f09ab59fa51dae6768dcb9 | |
parent | a7315116dd4a5c48ccb368491f7968071d49a427 (diff) | |
download | ffmpeg-fc3dec8b626f8c00fb89d1e66fdfbe9a021ca604.tar.gz |
lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
(cherry picked from commit c9eb5c9751c88caaed62af5ffe908fe545022e7e)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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 bdee64484b..070c224ecd 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2859,6 +2859,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); |