aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl')
-rw-r--r--src/ssl/hello.cpp3
-rw-r--r--src/ssl/s_kex.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ssl/hello.cpp b/src/ssl/hello.cpp
index 1efef9213..bec316bb1 100644
--- a/src/ssl/hello.cpp
+++ b/src/ssl/hello.cpp
@@ -125,7 +125,8 @@ void Client_Hello::deserialize_sslv2(const MemoryRegion<byte>& buf)
c_version = static_cast<Version_Code>(make_u16bit(buf[1], buf[2]));
- c_random.set(&buf[9+cipher_spec_len+sess_id_len], challenge_len);
+ c_random.resize(challenge_len);
+ copy_mem(&c_random[0], &buf[9+cipher_spec_len+sess_id_len], challenge_len);
}
/*
diff --git a/src/ssl/s_kex.cpp b/src/ssl/s_kex.cpp
index 757738859..1e7de31d0 100644
--- a/src/ssl/s_kex.cpp
+++ b/src/ssl/s_kex.cpp
@@ -111,7 +111,8 @@ void Server_Key_Exchange::deserialize(const MemoryRegion<byte>& buf)
if(len + so_far > buf.size())
throw Decoding_Error("Server_Key_Exchange: Packet corrupted");
- values[i].set(&buf[so_far], len);
+ values[i].resize(len);
+ copy_mem(&values[i][0], &buf[so_far], len);
so_far += len;
if(i == 2 && so_far == buf.size())