s3:gse_krb5: fix a possible crash in fill_mem_keytab_from_system_keytab()
authorMichael Saxl <mike@mwsys.mine.bz>
Sat, 24 Jun 2017 11:41:48 +0000 (13:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 27 Jun 2017 14:57:42 +0000 (16:57 +0200)
commita9780a2eaa9cba4ab87cc3371d97fa494fa0198c
tree1e26ef4c877e97d81a3fb1c511d2d3ec6bf2fa69
parenta075b7f8ddc8bd4cd63f9dfb6759bc41c2c9362d
s3:gse_krb5: fix a possible crash in fill_mem_keytab_from_system_keytab()

If the keytab file isn't readable, we may call
krb5_kt_end_seq_get() with an invalid kt_cursor.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10490

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Saxl <mike@mwsys.mine.bz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/librpc/crypto/gse_krb5.c