From c9eb5c9751c88caaed62af5ffe908fe545022e7e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 10 Jul 2013 13:15:57 +0200 Subject: [PATCH 1/2] lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation. --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) 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); From 1db88c33f2c0225aae160cc412b62dfaa3a34cbc Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 10 Jul 2013 13:16:28 +0200 Subject: [PATCH 2/2] Suggest recompilation with openssl or gnutls if the https protocol is not found. Fixes ticket #2765. --- libavformat/avio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/avio.c b/libavformat/avio.c index 73b2a29801..5916e46a2e 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -241,6 +241,8 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags, return url_alloc_for_protocol (puc, up, filename, flags, int_cb); } *puc = NULL; + if (!strcmp("https", proto_str)) + av_log(NULL, AV_LOG_WARNING, "https protocol not found, recompile with openssl or gnutls enabled.\n"); return AVERROR_PROTOCOL_NOT_FOUND; }