aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/rec_read.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 15:54:50 +0000
committerlloyd <[email protected]>2010-09-13 15:54:50 +0000
commit36bfef27271eadffefbc6891a9d7fa7eed7b1e10 (patch)
tree81fe9b37bb580cedba5bb25ac04dfecdd36b18de /src/ssl/rec_read.cpp
parent4a7e9edcc92b08a285ea24549fd8c813d10b63b9 (diff)
More vector->pointer conversion removals.
Add RandomNumberGenerator::random_vec, which takes an length n and returns a new SecureVector with randomized contents of that size. This nicely covers most of the cases where randomize was being called on a vector, and is a little cleaner in the code as well, instead of vec.resize(length); rng.randomize(&vec[0], vec.size()); we just write vec = rng.random_vec(length);
Diffstat (limited to 'src/ssl/rec_read.cpp')
-rw-r--r--src/ssl/rec_read.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ssl/rec_read.cpp b/src/ssl/rec_read.cpp
index 86b976417..789cac187 100644
--- a/src/ssl/rec_read.cpp
+++ b/src/ssl/rec_read.cpp
@@ -167,7 +167,7 @@ u32bit Record_Reader::get_record(byte& msg_type,
SecureVector<byte> buffer(record_len);
input_queue.read(header, sizeof(header)); // pull off the header
- input_queue.read(buffer, buffer.size());
+ input_queue.read(&buffer[0], buffer.size());
/*
* We are handshaking, no crypto to do so return as-is