aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_handshake_io.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-05-24 07:06:07 -0400
committerJack Lloyd <[email protected]>2019-05-24 07:06:07 -0400
commitd3706175d560ed8fbf3f4d3961cae910be1c77e0 (patch)
treea791958ae6eeefef5f10a72213a69553dabb707f /src/lib/tls/tls_handshake_io.cpp
parent78dff743222447cd626c6a7a1d94c5ccd46de02b (diff)
Add script for running TLS fuzzer
Fix a few minor issues found thereby
Diffstat (limited to 'src/lib/tls/tls_handshake_io.cpp')
-rw-r--r--src/lib/tls/tls_handshake_io.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tls/tls_handshake_io.cpp b/src/lib/tls/tls_handshake_io.cpp
index acc30b102..7ac868612 100644
--- a/src/lib/tls/tls_handshake_io.cpp
+++ b/src/lib/tls/tls_handshake_io.cpp
@@ -78,6 +78,9 @@ Stream_Handshake_IO::get_next_record(bool)
{
Handshake_Type type = static_cast<Handshake_Type>(m_queue[0]);
+ if(type == HANDSHAKE_NONE)
+ throw Decoding_Error("Invalid handshake message type");
+
std::vector<uint8_t> contents(m_queue.begin() + 4,
m_queue.begin() + length);