diff options
author | Pauli <paul.dale@oracle.com> | 2019-09-08 10:28:56 +0200 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-09-11 00:27:26 +0200 |
commit | 7e56c626936f7070070cf989053dc0011a9bca9c (patch) | |
tree | feda211b0b465c46860ca374410e72bae9a569f5 /ssl/t1_enc.c | |
parent | Coverity 1414465: Resource leaks (RESOURCE_LEAK) (diff) | |
download | openssl-7e56c626936f7070070cf989053dc0011a9bca9c.tar.xz openssl-7e56c626936f7070070cf989053dc0011a9bca9c.zip |
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 '')
-rw-r--r-- | ssl/t1_enc.c | 3 |
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, |