From 53b924f540315a4d4f699b47a51f1a3834486702 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 27 Feb 2007 22:41:36 +0000 Subject: [PATCH] pull up r19172 from trunk r19172@cathode-dark-space: raeburn | 2007-02-23 19:58:05 -0500 ticket: 5445 status: open 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 version_fixed: 1.6.1 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19187 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/mechglue/g_imp_name.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.26.2