Skip to content

Commit 46c66fe

Browse files
authored
Update Channel.java
1 parent 7e00fa2 commit 46c66fe

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/com/jcraft/jsch/Channel.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,11 @@ static void del(Channel c) {
140140
synchronized (pool) {
141141
id = index++;
142142

143-
/*
144-
* OpenSSH 8.0 introduced a bug that rejected channels with an ID that exceeds INT_MAX.
145-
* See https://github.com/openssh/openssh-portable/commit/7ec5cb4d15ed2f2c5c9f5d00e6b361d136fc1e2d.
146-
* This bug was later resolved in OpenSSH 8.2.
147-
* See https://github.com/openssh/openssh-portable/commit/0ecd20bc9f0b9c7c697c9eb014613516c8f65834.
148-
* To ensure compatibility, clamp the ID value JSch uses to not exceed INT_MAX.
149-
*/
143+
// OpenSSH 8.0 introduced a bug that rejected channels with an ID that exceeds INT_MAX.
144+
// See https://github.com/openssh/openssh-portable/commit/7ec5cb4.
145+
// This bug was later resolved in OpenSSH 8.2.
146+
// See https://github.com/openssh/openssh-portable/commit/0ecd20b.
147+
// To allow compability, cap the ID value to not exceed INT_MAX.
150148

151149
index &= Integer.MAX_VALUE;
152150
pool.addElement(this);

0 commit comments

Comments
 (0)