Skip to content

Commit

Permalink
[Seckrb5] Avoid null pointer dereference (xrootd#2385)
Browse files Browse the repository at this point in the history
  • Loading branch information
smithdh authored Dec 11, 2024
1 parent 8a4ca75 commit 2c269c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/XrdSeckrb5/XrdSecProtocolkrb5.cc
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ int XrdSecProtocolkrb5::Authenticate(XrdSecCredentials *cred,
{char* cpName;
int ec;
isCP = true;
if ((ec = krb5_unparse_name(krb_context,
if (!Ticket || !Ticket->enc_part2)
cPrincipal = "[principal not available]";
else if ((ec = krb5_unparse_name(krb_context,
(krb5_const_principal)Ticket->enc_part2->client,
(char **)&cpName)))
{char mBuff[1024];
Expand Down

0 comments on commit 2c269c6

Please sign in to comment.