pull up r19172 from trunk
authorTom Yu <tlyu@mit.edu>
Tue, 27 Feb 2007 22:41:36 +0000 (22:41 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 27 Feb 2007 22:41:36 +0000 (22:41 +0000)
 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

index e0370458f7c2de1dab4bfab2ee17b6ff3d91bba9..fa7aa8d13b490761cca4f7e4119f364cd87cbd0f 100644 (file)
@@ -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);