diff options
author | Henrik Nord <[email protected]> | 2014-10-23 11:31:11 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-10-23 11:31:11 +0200 |
commit | 4dd483c187317ace77d052eec43cc34efb9b00a3 (patch) | |
tree | 43e0d35e8d442c1731bddcb7bdb47450f4ec7f0a /lib/ssh/src/ssh_message.erl | |
parent | f5fab7691de210fec10e5c5d9db67710958797a3 (diff) | |
parent | 9f0477e13bb8819ee252d2b8834c1411f02a9cb8 (diff) | |
download | otp-4dd483c187317ace77d052eec43cc34efb9b00a3.tar.gz otp-4dd483c187317ace77d052eec43cc34efb9b00a3.tar.bz2 otp-4dd483c187317ace77d052eec43cc34efb9b00a3.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r-- | lib/ssh/src/ssh_message.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl index 891ccec24c..66e7717095 100644 --- a/lib/ssh/src/ssh_message.erl +++ b/lib/ssh/src/ssh_message.erl @@ -505,6 +505,11 @@ erl_boolean(1) -> decode_kex_init(<<?BYTE(Bool), ?UINT32(X)>>, Acc, 0) -> list_to_tuple(lists:reverse([X, erl_boolean(Bool) | Acc])); +decode_kex_init(<<?BYTE(Bool)>>, Acc, 0) -> + %% The mandatory trailing UINT32 is missing. Assume the value it anyhow must have + %% See rfc 4253 7.1 + X = 0, + list_to_tuple(lists:reverse([X, erl_boolean(Bool) | Acc])); decode_kex_init(<<?UINT32(Len), Data:Len/binary, Rest/binary>>, Acc, N) -> Names = string:tokens(unicode:characters_to_list(Data), ","), decode_kex_init(Rest, [Names | Acc], N -1). |