diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-10-09 17:39:24 +0200 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-10-12 21:01:10 +0200 |
commit | 14b6c7941fa6eaf93a0214d00e9280c213e0ea75 (patch) | |
tree | 2faf99ae0191a4bcf499abc4130fa1fd88a2eb60 | |
parent | de3fd8abef40247fbcc01fe3f2556b845e03a2f5 (diff) | |
download | gnutls-14b6c7941fa6eaf93a0214d00e9280c213e0ea75.tar.gz |
lib/handshake.c: Check return value of _gnutls_version_max()
Fixes Coverity issue 1454674
Fixes Coverity issue 1454658
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
-rw-r--r-- | lib/handshake.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/handshake.c b/lib/handshake.c index a624086daa..ea48c93b88 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -295,6 +295,8 @@ int _gnutls_gen_server_random(gnutls_session_t session, int version) } max = _gnutls_version_max(session); + if (max == NULL) + return gnutls_assert_val(GNUTLS_E_NO_CIPHER_SUITES); if (!IS_DTLS(session) && max->id >= GNUTLS_TLS1_3 && version <= GNUTLS_TLS1_2) { |