diff options
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r-- | src/lib/gssapi/krb5/ChangeLog | 7 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/wrap_size_limit.c | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index f242894f4..1626ec2cf 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/src/lib/gssapi/krb5/wrap_size_limit.c b/src/lib/gssapi/krb5/wrap_size_limit.c index 8c47d0fa6..e883efde1 100644 --- a/src/lib/gssapi/krb5/wrap_size_limit.c +++ b/src/lib/gssapi/krb5/wrap_size_limit.c @@ -68,8 +68,14 @@ krb5_gss_wrap_size_limit(minor_status, context_handle, conf_req_flag, 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); } |