From 2b54c86e7e043ebae6f056943bdffd039bfd0ba7 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 3 Jun 2018 07:11:10 +0100 Subject: [PATCH] Stop calling ssh2_set_window in SSH-1! This must have been a bug introduced during the SSH-2 connection sharing rework. Apparently nobody's ever re-tested SSH-1 X forwarding since then - until I did so yesterday in the course of testing my enormous refactor of the packet unmarshalling code. --- ssh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssh.c b/ssh.c index 77d3f582..24c17630 100644 --- a/ssh.c +++ b/ssh.c @@ -9456,7 +9456,9 @@ void sshfwd_x11_is_local(struct ssh_channel *c) * exchange mode. */ c->u.x11.initial = FALSE; - ssh2_set_window(c, ssh_is_simple(c->ssh) ? OUR_V2_BIGWIN : OUR_V2_WINSIZE); + if (c->ssh->version == 2) + ssh2_set_window( + c, ssh_is_simple(c->ssh) ? OUR_V2_BIGWIN : OUR_V2_WINSIZE); } /*