aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-29 15:15:30 +0000
committerlloyd <[email protected]>2010-10-29 15:15:30 +0000
commit66b163323d39ac5c0be30fd0b1c0fd91b64a55f3 (patch)
treee745b4824105f600ec5452e591a112229bc01478 /src/ssl
parent89a2e78d2ff2f0266825708a0294b13a4c370a29 (diff)
Make MemoryRegion::set protected, change all callers
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())