Skip to content

Commit 2c269c6

Browse files
authored
[Seckrb5] Avoid null pointer dereference (xrootd#2385)
1 parent 8a4ca75 commit 2c269c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/XrdSeckrb5/XrdSecProtocolkrb5.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ int XrdSecProtocolkrb5::Authenticate(XrdSecCredentials *cred,
510510
{char* cpName;
511511
int ec;
512512
isCP = true;
513-
if ((ec = krb5_unparse_name(krb_context,
513+
if (!Ticket || !Ticket->enc_part2)
514+
cPrincipal = "[principal not available]";
515+
else if ((ec = krb5_unparse_name(krb_context,
514516
(krb5_const_principal)Ticket->enc_part2->client,
515517
(char **)&cpName)))
516518
{char mBuff[1024];

0 commit comments

Comments
 (0)