From: Tom Yu Date: Fri, 31 Aug 2007 21:38:41 +0000 (+0000) Subject: pull up r19736 from trunk X-Git-Tag: krb5-1.6.3-beta1~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6eefe58821e704d8387385d646533d4e831b3fc9;p=krb5.git pull up r19736 from trunk r19736@cathode-dark-space: raeburn | 2007-07-27 00:38:46 -0400 ticket: 5471 Check for null file handle in get_next. Patch from Luke Howard. ticket: 5471 version_fixed: 1.6.3 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19907 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/keytab/kt_file.c b/src/lib/krb5/keytab/kt_file.c index 92947d593..776727a01 100644 --- a/src/lib/krb5/keytab/kt_file.c +++ b/src/lib/krb5/keytab/kt_file.c @@ -461,6 +461,10 @@ krb5_ktfile_get_next(krb5_context context, krb5_keytab id, krb5_keytab_entry *en kerror = KTLOCK(id); if (kerror) return kerror; + if (KTFILEP(id) == NULL) { + KTUNLOCK(id); + return KRB5_KT_IOERR; + } if (fseek(KTFILEP(id), *fileoff, 0) == -1) { KTUNLOCK(id); return KRB5_KT_END;