]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - proxy.c
Added a command-line key generation tool. Currently builds and runs
[PuTTY.git] / proxy.c
diff --git a/proxy.c b/proxy.c
index 169be0d1d139209f63265032607af8316c9ff6e7..d970b2bf773f1f9ac606d84ed84dda1c0e57f0b4 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -161,10 +161,14 @@ static void sk_proxy_set_frozen (Socket s, int is_frozen)
         */
         while (!ps->freeze && bufchain_size(&ps->pending_input_data) > 0) {
            void *data;
+           char databuf[512];
            int len;
            bufchain_prefix(&ps->pending_input_data, &data, &len);
-           plug_receive(ps->plug, 0, data, len);
+           if (len > lenof(databuf))
+               len = lenof(databuf);
+           memcpy(databuf, data, len);
            bufchain_consume(&ps->pending_input_data, len);
+           plug_receive(ps->plug, 0, databuf, len);
        }
 
        /* if we're still frozen, we'll have to wait for another