diff options
Diffstat (limited to 'src/lib/tls/tls_ciphersuite.cpp')
-rw-r--r-- | src/lib/tls/tls_ciphersuite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tls/tls_ciphersuite.cpp b/src/lib/tls/tls_ciphersuite.cpp index a15f936be..08ef8e812 100644 --- a/src/lib/tls/tls_ciphersuite.cpp +++ b/src/lib/tls/tls_ciphersuite.cpp @@ -45,7 +45,7 @@ Ciphersuite Ciphersuite::by_id(u16bit suite) const std::vector<Ciphersuite>& all_suites = all_known_ciphersuites(); auto s = std::lower_bound(all_suites.begin(), all_suites.end(), suite); - if(s->ciphersuite_code() == suite) + if(s != all_suites.end() && s->ciphersuite_code() == suite) { return *s; } |