[FFmpeg-cvslog] http: Make sure proxyauth is initialized

Martin Storsjö git at videolan.org
Fri Dec 2 01:00:52 CET 2011


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Dec  1 11:24:23 2011 +0200| [abe20c59b93426958624e16e89b24e0c0b43f370] | committer: Martin Storsjö

http: Make sure proxyauth is initialized

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ö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=abe20c59b93426958624e16e89b24e0c0b43f370
---

 libavformat/http.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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



More information about the ffmpeg-cvslog mailing list