1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix segfault in SSH-1 X forwarding.

The SSH-1 SshChannel vtable didn't bother to provide the
window_override_removed method, because I wrongly remembered that it
was only called when connection sharing. In fact, it's _called_ in any
X forwarding, but it only has to _do_ anything when connection
sharing: SSH-1 has to provide an empty implementation to avoid
segfaulting by calling a null function pointer.
This commit is contained in:
Simon Tatham 2018-10-13 16:30:59 +01:00
parent 56096ba558
commit 8d7150b1ac

View File

@ -177,6 +177,7 @@ static void ssh1channel_write_eof(SshChannel *c);
static void ssh1channel_unclean_close(SshChannel *c, const char *err);
static void ssh1channel_unthrottle(SshChannel *c, int bufsize);
static Conf *ssh1channel_get_conf(SshChannel *c);
static void ssh1channel_window_override_removed(SshChannel *c) { /* ignore */ }
static const struct SshChannelVtable ssh1channel_vtable = {
ssh1channel_write,
@ -184,8 +185,7 @@ static const struct SshChannelVtable ssh1channel_vtable = {
ssh1channel_unclean_close,
ssh1channel_unthrottle,
ssh1channel_get_conf,
NULL /* window_override_removed is only used by SSH-2 sharing */,
NULL /* x11_sharing_handover, likewise */,
ssh1channel_window_override_removed,
};
static void ssh1_channel_init(struct ssh1_channel *c);