diff options
author | Damien Miller <djm@mindrot.org> | 2004-06-18 22:23:22 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-06-18 22:23:22 +1000 |
commit | 3bbd878c2ec2b337b9e5b9455e0a2bd1902a0824 (patch) | |
tree | b5d4eae0c95ab46b30b41f3f2f4611d8816adfda /channels.c | |
parent | b8ea24868f0347ea6d5116cbd93197c1ab0e942b (diff) |
- djm@cvs.openbsd.org 2004/06/18 11:11:54
[channels.c clientloop.c]
Don't explode in clientloop when we receive a bogus channel id, but
also don't generate them to begin with; ok markus@
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels.c b/channels.c index 97c1fd31b..68d854388 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.205 2004/06/14 01:44:38 djm Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.206 2004/06/18 11:11:54 djm Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -487,7 +487,7 @@ channel_find_open(void) | |||
487 | 487 | ||
488 | for (i = 0; i < channels_alloc; i++) { | 488 | for (i = 0; i < channels_alloc; i++) { |
489 | c = channels[i]; | 489 | c = channels[i]; |
490 | if (c == NULL) | 490 | if (c == NULL || c->remote_id < 0) |
491 | continue; | 491 | continue; |
492 | switch (c->type) { | 492 | switch (c->type) { |
493 | case SSH_CHANNEL_CLOSED: | 493 | case SSH_CHANNEL_CLOSED: |