diff options
author | lloyd <[email protected]> | 2015-05-15 03:31:56 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-05-15 03:31:56 +0000 |
commit | a4e88fa2610da732ea1125b1ed970baed6d286bb (patch) | |
tree | 10e422f42bcf419bbcec835feb4f41c590286bbe /src/lib/tls/tls_extensions.cpp | |
parent | 12eea2e817528e7d1a85e5e80b360eead6e5d206 (diff) |
Fix various bugs found by Coverity scanner.
Uninitialized variables, missing divide by zero checks, missing
virtual destructor, etc. Only thing serious is bug in TLS maximum
fragment decoder; missing breaks in switch statement meant receiver
would treat any negotiated max frament as 4k limit.
Diffstat (limited to 'src/lib/tls/tls_extensions.cpp')
-rw-r--r-- | src/lib/tls/tls_extensions.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp index b7ba4a917..5f28c98b8 100644 --- a/src/lib/tls/tls_extensions.cpp +++ b/src/lib/tls/tls_extensions.cpp @@ -246,12 +246,16 @@ Maximum_Fragment_Length::Maximum_Fragment_Length(TLS_Data_Reader& reader, { case 1: m_max_fragment = 512; + break; case 2: m_max_fragment = 1024; + break; case 3: m_max_fragment = 2048; + break; case 4: m_max_fragment = 4096; + break; default: throw TLS_Exception(Alert::ILLEGAL_PARAMETER, "Bad value " + std::to_string(val) + " for max fragment len"); |