aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_message.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-10-23 11:30:40 +0200
committerHenrik Nord <[email protected]>2014-10-23 11:30:40 +0200
commit9f0477e13bb8819ee252d2b8834c1411f02a9cb8 (patch)
tree6373cd013fc3ff1220b3845a8e50230d8105c04c /lib/ssh/src/ssh_message.erl
parente97f9bc1672cb2d2c07d4133030528b43b26532c (diff)
parent461757503e8ecaaeb3ea9b84f5c0dfccd3408694 (diff)
downloadotp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.tar.gz
otp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.tar.bz2
otp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.zip
Merge branch 'maint-17' into maint
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r--lib/ssh/src/ssh_message.erl5
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).