When importing a name with a valid (non-null) handle but a zero
authorKen Raeburn <raeburn@mit.edu>
Sat, 24 Feb 2007 00:58:05 +0000 (00:58 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 24 Feb 2007 00:58:05 +0000 (00:58 +0000)
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

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);