]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Another missing initialisation.
authorSimon Tatham <anakin@pobox.com>
Sat, 22 Nov 2014 16:35:54 +0000 (16:35 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 22 Nov 2014 16:35:54 +0000 (16:35 +0000)
This one spotted in the old-fashioned way, by actually attempting a
Plink raw connection and wondering why it didn't seem to be reading
from standard input! Turns out 'bufsize' is uninitialised until the
first send, which can inhibit any stdin reading if it gets a large
enough nonsense value.

raw.c

diff --git a/raw.c b/raw.c
index a7fbbc5cc5f32e8c23feae149dc53c5a3193795a..97355e8ad768bd38df89bc653736a386c9143c5b 100644 (file)
--- a/raw.c
+++ b/raw.c
@@ -146,6 +146,7 @@ static const char *raw_init(void *frontend_handle, void **backend_handle,
     raw->closed_on_socket_error = FALSE;
     *backend_handle = raw;
     raw->sent_console_eof = raw->sent_socket_eof = FALSE;
+    raw->bufsize = 0;
 
     raw->frontend = frontend_handle;