From: Greg Hudson Date: Mon, 25 Jun 2012 15:19:56 +0000 (-0400) Subject: Fix crash on invalid DIR ccache primary file X-Git-Tag: krb5-1.11-alpha1~487 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=036ca94bdc00cc8eb248dc5c0da85ab556d3373e;p=thirdparty%2Fkrb5.git Fix crash on invalid DIR ccache primary file If read_primary_file() fails with an error other than ENOENT, abort cache resolution rather than dereferencing a null pointer. Reported by Oliver Loch. ticket: 7185 target_version: 1.10.3 tags: pullup --- diff --git a/src/lib/krb5/ccache/cc_dir.c b/src/lib/krb5/ccache/cc_dir.c index d77cce45b5..f241c0acb2 100644 --- a/src/lib/krb5/ccache/cc_dir.c +++ b/src/lib/krb5/ccache/cc_dir.c @@ -343,9 +343,9 @@ dcc_resolve(krb5_context context, krb5_ccache *cache_out, const char *residual) if (ret) goto cleanup; ret = subsidiary_residual(residual, "tkt", &sresidual); - if (ret) - goto cleanup; } + if (ret) + goto cleanup; residual = sresidual; }