output header size is greater than the maximum requested output size,
return 0 rather than a very large unsigned number. :-)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10413
dc483132-0cff-0310-8789-
dd5450dbe970
+Thu Feb 5 22:39:44 1998 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * wrap_size_limit.c (krb5_gss_wrap_size_limit): Fix bug where if
+ the output header size is greater than the maximum
+ requested output size, return 0 rather than a very large
+ unsigned number. :-)
+
Fri Jan 30 23:07:40 1998 Tom Yu <tlyu@mit.edu>
* init_sec_context.c (krb5_gss_init_sec_context): Actually
ohlen = g_token_size((gss_OID) ctx->mech_used,
(unsigned int) cfsize + ctx->cksum_size + 14);
- /* Cannot have trailer length that will cause us to pad over our length */
- *max_input_size = (req_output_size - ohlen) & (~7);
+ if (ohlen < req_output_size)
+ /*
+ * Cannot have trailer length that will cause us to pad over
+ * our length
+ */
+ *max_input_size = (req_output_size - ohlen) & (~7);
+ else
+ *max_input_size = 0;
*minor_status = 0;
return(GSS_S_COMPLETE);
}