summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-08 18:28:56 +1000
committerPauli <paul.dale@oracle.com>2019-09-11 08:27:26 +1000
commit7e56c626936f7070070cf989053dc0011a9bca9c (patch)
treefeda211b0b465c46860ca374410e72bae9a569f5 /ssl
parent92475712a9ca5e53913c4d1541ea9d044e183108 (diff)
Coverity 1453627: Null pointer dereferences (REVERSE_INULL)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/t1_enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 4419d3f10b..6726d8fb7d 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -35,7 +35,7 @@ static int tls1_PRF(SSL *s,
EVP_KDF *kdf;
EVP_KDF_CTX *kctx = NULL;
OSSL_PARAM params[8], *p = params;
- const char *mdname = EVP_MD_name(md);
+ const char *mdname;
if (md == NULL) {
/* Should never happen */
@@ -53,6 +53,7 @@ static int tls1_PRF(SSL *s,
EVP_KDF_free(kdf);
if (kctx == NULL)
goto err;
+ mdname = EVP_MD_name(md);
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
(char *)mdname, strlen(mdname) + 1);
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SECRET,