Skip to content
Snippets Groups Projects
Commit fed5b552 authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

SSL_set_session: check for NULL after allocating s->kssl_ctx->client_princ


Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent e9e688ef
No related branches found
No related tags found
No related merge requests found
......@@ -792,6 +792,11 @@ int SSL_set_session(SSL *s, SSL_SESSION *session)
session->krb5_client_princ_len > 0)
{
s->kssl_ctx->client_princ = (char *)OPENSSL_malloc(session->krb5_client_princ_len + 1);
if (s->kssl_ctx->client_princ == NULL)
{
SSLerr(SSL_F_SSL_SET_SESSION, ERR_R_MALLOC_FAILURE);
return(0);
}
memcpy(s->kssl_ctx->client_princ,session->krb5_client_princ,
session->krb5_client_princ_len);
s->kssl_ctx->client_princ[session->krb5_client_princ_len] = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment