SHA256
1
0
forked from pool/krb5
krb5/krb5-1.4.3-extra-check-kt_file.c.dif

16 lines
467 B
Plaintext

Index: src/lib/krb5/keytab/kt_file.c
===================================================================
--- src/lib/krb5/keytab/kt_file.c.orig
+++ src/lib/krb5/keytab/kt_file.c
@@ -461,6 +461,10 @@ krb5_ktfile_get_next(krb5_context contex
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;