]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Assert that ssh2_channel_check_close() is only called in SSH-2.
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 22 May 2016 12:50:34 +0000 (13:50 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 22 May 2016 12:50:34 +0000 (13:50 +0100)
That really should be true, but I don't entirely trust
sshfwd_unclean_close().

ssh.c

diff --git a/ssh.c b/ssh.c
index df303b7be12276ee29cc5b93b8a69efd77995c54..a790f7177fe23f3ae3f3914f602cc4e8c08e3f43 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -8207,6 +8207,7 @@ static void ssh2_channel_check_close(struct ssh_channel *c)
     Ssh ssh = c->ssh;
     struct Packet *pktout;
 
+    assert(ssh->version == 2);
     if (c->halfopen) {
         /*
          * If we've sent out our own CHANNEL_OPEN but not yet seen