From abe20c59b93426958624e16e89b24e0c0b43f370 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Thu, 1 Dec 2011 11:24:23 +0200 Subject: http: Make sure proxyauth is initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This string will be passed to ff_http_auth_create_response even if no proxy is used, resulting in reading uninitialized memory. The other auth string is always initialized by av_url_split. Signed-off-by: Martin Storsjö --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index 63cfecd332..a9b4d5a573 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -90,7 +90,7 @@ static int http_open_cnx(URLContext *h) { const char *path, *proxy_path, *lower_proto = "tcp", *local_path; char hostname[1024], hoststr[1024], proto[10]; - char auth[1024], proxyauth[1024]; + char auth[1024], proxyauth[1024] = ""; char path1[1024]; char buf[1024], urlbuf[1024]; int port, use_proxy, err, location_changed = 0, redirects = 0; -- cgit v1.2.3