]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix write to freed memory in HTTP proxying. Things aren't entirely happy yet,
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 7 Dec 2002 21:15:49 +0000 (21:15 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 7 Dec 2002 21:15:49 +0000 (21:15 +0000)
though.

[originally from svn r2285]

proxy.c

diff --git a/proxy.c b/proxy.c
index a02fc11cda050f7e3fbc7382752667df30235237..c1aab15f2880c908211e8c7c0a43a686d7e0c03f 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -481,8 +481,7 @@ int proxy_http_negotiate (Proxy_Socket p, int change)
            sk_write(p->sub_socket, buf2, strlen(buf2));
        }
 
-       sprintf(buf, "\r\n");
-       sk_write(p->sub_socket, buf, strlen(buf));
+       sk_write(p->sub_socket, "\r\n", strlen(buf));
 
        p->state = 1;
        return 0;