Allow zero length but non-NULL tokens on init_sec_context
[mech_eap.orig] / init_sec_context.c
index bc3f554..b46f981 100644 (file)
@@ -730,7 +730,7 @@ gss_init_sec_context(OM_uint32 *minor,
 
     sm = &eapGssInitiatorSm[ctx->state];
 
-    if (input_token != GSS_C_NO_BUFFER) {
+    if (input_token != GSS_C_NO_BUFFER && input_token->length != 0) {
         major = gssEapVerifyToken(minor, ctx, input_token,
                                   &tokType, &innerInputToken);
         if (GSS_ERROR(major))