Fix write to freed memory in HTTP proxying. Things aren't entirely happy yet,
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Dec 2002 21:15:49 +0000 (21:15 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 Dec 2002 21:15:49 +0000 (21:15 +0000)
though.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2285 cda61777-01e9-0310-a592-d414129be87e

proxy.c

diff --git a/proxy.c b/proxy.c
index a02fc11..c1aab15 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;