From: Tom Yu Date: Fri, 5 Feb 2010 03:25:49 +0000 (+0000) Subject: Apply patch from Arlene Berry to avoid segfault if a mech X-Git-Tag: krb5-1.9-beta1~360 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bebdddf413bc4edbe6a738f6f01aa3428d2e8381;p=krb5.git Apply patch from Arlene Berry to avoid segfault if a mech gss_inquire_context returns GSS_C_NO_NAME for the target name. ticket: 6600 tags: pullup target_version: 1.8 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23696 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_inq_context.c b/src/lib/gssapi/mechglue/g_inq_context.c index fbb4127d8..bb6d5693f 100644 --- a/src/lib/gssapi/mechglue/g_inq_context.c +++ b/src/lib/gssapi/mechglue/g_inq_context.c @@ -141,6 +141,7 @@ gss_inquire_context( } if (targ_name) { + if (localTargName) { status = gssint_convert_name_to_union_name(minor_status, mech, localTargName, targ_name); @@ -150,6 +151,10 @@ gss_inquire_context( return (status); } + } + else { + *targ_name = GSS_C_NO_NAME; + } } /* spec says mech type must point to static storage */