You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2017/10/25 16:30:08 UTC
mina-sshd git commit: [SSHD-738] "BufferException: Underflow" warning
is frequently reported [Forced Update!]
Repository: mina-sshd
Updated Branches:
refs/heads/master c703a1f6c -> 046527707 (forced update)
[SSHD-738] "BufferException: Underflow" warning is frequently reported
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/04652770
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/04652770
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/04652770
Branch: refs/heads/master
Commit: 04652770795ceaf19ba15cc7f4d236ec8f059950
Parents: 4ea5f2b
Author: Guillaume Nodet <gn...@apache.org>
Authored: Wed Oct 25 18:26:09 2017 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Wed Oct 25 18:29:58 2017 +0200
----------------------------------------------------------------------
.../sshd/common/session/helpers/AbstractSession.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/04652770/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
index e5f40ce..b2f9acd 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
@@ -88,6 +88,7 @@ import org.apache.sshd.common.util.Pair;
import org.apache.sshd.common.util.Readable;
import org.apache.sshd.common.util.ValidateUtils;
import org.apache.sshd.common.util.buffer.Buffer;
+import org.apache.sshd.common.util.buffer.BufferException;
import org.apache.sshd.common.util.buffer.BufferUtils;
import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
@@ -740,7 +741,14 @@ public abstract class AbstractSession extends AbstractKexFactoryManager implemen
protected void handleDisconnect(Buffer buffer) throws Exception {
int code = buffer.getInt();
String message = buffer.getString();
- String languageTag = buffer.getString();
+ String languageTag;
+ // SSHD-738: avoid spamming the log with uninteresting
+ // messages caused by buggy OpenSSH < 5.5
+ if (buffer.available() > 0) {
+ languageTag = buffer.getString();
+ } else {
+ languageTag = "";
+ }
handleDisconnect(code, message, languageTag, buffer);
}