From: Ken Raeburn Date: Sat, 24 Feb 2007 00:58:05 +0000 (+0000) Subject: When importing a name with a valid (non-null) handle but a zero X-Git-Tag: krb5-1.7-alpha1~1282 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c629258bddc9cd74fdafbcf9465c299486211a9;p=krb5.git When importing a name with a valid (non-null) handle but a zero length, set GSS_S_BAD_NAME but not GSS_S_CALL_INACCESSIBLE_READ. ticket: 5445 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19172 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_imp_name.c b/src/lib/gssapi/mechglue/g_imp_name.c index e0370458f..fa7aa8d13 100644 --- a/src/lib/gssapi/mechglue/g_imp_name.c +++ b/src/lib/gssapi/mechglue/g_imp_name.c @@ -65,7 +65,10 @@ val_imp_name_args( if (input_name_buffer == GSS_C_NO_BUFFER) return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME); - if (GSS_EMPTY_BUFFER(input_name_buffer)) + if (input_name_buffer->length == 0) + return GSS_S_BAD_NAME; + + if (input_name_buffer->value == NULL) return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME); return (GSS_S_COMPLETE);