aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_message.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-02-13 17:39:53 +0100
committerHans Nilsson <[email protected]>2014-02-13 17:39:53 +0100
commite3f1a078cf8a03d4adbb1f71702f3daec2f15119 (patch)
treed4e822718a07be29771d70990528405961a676b3 /lib/ssh/src/ssh_message.erl
parentb28f32d3b793fa7dbaa97f015f84b402bcca2161 (diff)
parentdd9475eb43438eff962ef7fbc13e5fe5e0638ac4 (diff)
downloadotp-e3f1a078cf8a03d4adbb1f71702f3daec2f15119.tar.gz
otp-e3f1a078cf8a03d4adbb1f71702f3daec2f15119.tar.bz2
otp-e3f1a078cf8a03d4adbb1f71702f3daec2f15119.zip
Merge branch 'hans/ssh/membug/OTP_11696'
* hans/ssh/membug/OTP_11696: ssh: Fixes memory crash
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r--lib/ssh/src/ssh_message.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index fa4397b2f5..95016a9832 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -424,8 +424,9 @@ decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_REQUEST_OLD), ?UINT32(N)>>) ->
#ssh_msg_kex_dh_gex_request_old{
n = N
};
-decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP), ?UINT32(Len0), Prime:Len0/big-signed-integer,
- ?UINT32(Len1), Generator:Len1/big-signed-integer>>) ->
+decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP),
+ ?UINT32(Len0), Prime:Len0/big-signed-integer-unit:8,
+ ?UINT32(Len1), Generator:Len1/big-signed-integer-unit:8>>) ->
#ssh_msg_kex_dh_gex_group{
p = Prime,
g = Generator