From 024cf552377231d176099a893219c54158fab8f3 Mon Sep 17 00:00:00 2001 From: Juraj Somorovsky Date: Tue, 20 Sep 2016 14:27:46 +0200 Subject: Vector out of bounds fix --- src/lib/tls/msg_hello_verify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/tls/msg_hello_verify.cpp b/src/lib/tls/msg_hello_verify.cpp index c1dc574d4..059d9d4fd 100644 --- a/src/lib/tls/msg_hello_verify.cpp +++ b/src/lib/tls/msg_hello_verify.cpp @@ -28,7 +28,7 @@ Hello_Verify_Request::Hello_Verify_Request(const std::vector& buf) if(static_cast(buf[2]) + 3 != buf.size()) throw Decoding_Error("Bad length in hello verify request"); - m_cookie.assign(&buf[3], &buf[buf.size()]); + m_cookie.assign(buf.begin() + 3, buf.end()); } Hello_Verify_Request::Hello_Verify_Request(const std::vector& client_hello_bits, -- cgit v1.2.3