summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--serverloop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/serverloop.c b/serverloop.c
index 1babc7a51..e16eabe27 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.219 2020/01/23 07:10:22 dtucker Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.220 2020/01/25 04:48:26 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -685,9 +685,7 @@ server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)
685 debug("%s: ctype %s rchan %u win %u max %u", __func__, 685 debug("%s: ctype %s rchan %u win %u max %u", __func__,
686 ctype, rchan, rwindow, rmaxpack); 686 ctype, rchan, rwindow, rmaxpack);
687 687
688 if (rchan > INT_MAX) { 688 if (strcmp(ctype, "session") == 0) {
689 error("%s: invalid remote channel ID", __func__);
690 } else if (strcmp(ctype, "session") == 0) {
691 c = server_request_session(ssh); 689 c = server_request_session(ssh);
692 } else if (strcmp(ctype, "direct-tcpip") == 0) { 690 } else if (strcmp(ctype, "direct-tcpip") == 0) {
693 c = server_request_direct_tcpip(ssh, &reason, &errmsg); 691 c = server_request_direct_tcpip(ssh, &reason, &errmsg);
@@ -698,7 +696,7 @@ server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)
698 } 696 }
699 if (c != NULL) { 697 if (c != NULL) {
700 debug("%s: confirm %s", __func__, ctype); 698 debug("%s: confirm %s", __func__, ctype);
701 c->remote_id = (int)rchan; 699 c->remote_id = rchan;
702 c->have_remote_id = 1; 700 c->have_remote_id = 1;
703 c->remote_window = rwindow; 701 c->remote_window = rwindow;
704 c->remote_maxpacket = rmaxpack; 702 c->remote_maxpacket = rmaxpack;