]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r4020: Fix for crash reported by Bård Kalbakk <baard@inett.biz>.
authorJeremy Allison <jra@samba.org>
Tue, 30 Nov 2004 18:58:58 +0000 (18:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:28 +0000 (10:53 -0500)
Don't go fishing for the authorisation data unless we
know it's there.
Jeremy.

source/libsmb/clikrb5.c

index 068e78220723067f8fc233bc1ea43795fe15b563..15be8967b843b828b791a411417b34ad92a659de 100644 (file)
  void get_auth_data_from_tkt(DATA_BLOB *auth_data, krb5_ticket *tkt)
 {
 #if defined(HAVE_KRB5_TKT_ENC_PART2)
-       if (tkt->enc_part2)
+       if (tkt->enc_part2 && tkt->enc_part2->authorization_data && tkt->enc_part2->authorization_data[0] && tkt->enc_part2->authorization_data[0]->length)
                *auth_data = data_blob(tkt->enc_part2->authorization_data[0]->contents,
                        tkt->enc_part2->authorization_data[0]->length);
 #else