diff --git a/libavformat/http.c b/libavformat/http.c
index 63cfecd33260ea2d326cb23973b2bec55bf2753f..a9b4d5a57344520475e547f35950d4efbeac5e24 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;