]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - proxy.c
Fix write to freed memory in HTTP proxying. Things aren't entirely happy yet,
[PuTTY.git] / 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;