From: Ezra Peisach Date: Fri, 15 Nov 2002 16:12:03 +0000 (+0000) Subject: * gssapiP_generic.h, util_token.c: Change g_make_token_header and X-Git-Tag: krb5-1.3-alpha1~268 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=866703fab606a48b897eddeabeddf46823589756;p=krb5.git * gssapiP_generic.h, util_token.c: Change g_make_token_header and g_verfy_token_header to take an unsigned length in. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15006 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 35c0f07d4..f5f4c442c 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,8 @@ +2002-11-15 Ezra Peisach + + * gssapiP_generic.h, util_token.c: Change g_make_token_header and + g_verfy_token_header to take an unsigned length in. + 2002-10-07 Sam Hartman * Makefile.in : Add install-headers- support diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h index 7e3d1a68b..e31627e95 100644 --- a/src/lib/gssapi/generic/gssapiP_generic.h +++ b/src/lib/gssapi/generic/gssapiP_generic.h @@ -155,11 +155,12 @@ int g_copy_OID_set (const gss_OID_set_desc * const in, gss_OID_set *out); int g_token_size (gss_OID mech, unsigned int body_size); -void g_make_token_header (gss_OID mech, int body_size, +void g_make_token_header (gss_OID mech, unsigned int body_size, unsigned char **buf, int tok_type); gss_int32 g_verify_token_header (gss_OID mech, unsigned int *body_size, - unsigned char **buf, int tok_type, int toksize); + unsigned char **buf, int tok_type, + unsigned int toksize_in); OM_uint32 g_display_major_status (OM_uint32 *minor_status, OM_uint32 status_value, diff --git a/src/lib/gssapi/generic/util_token.c b/src/lib/gssapi/generic/util_token.c index b8719c0cd..9cd1ce2f1 100644 --- a/src/lib/gssapi/generic/util_token.c +++ b/src/lib/gssapi/generic/util_token.c @@ -140,7 +140,7 @@ int g_token_size(mech, body_size) void g_make_token_header(mech, body_size, buf, tok_type) gss_OID mech; - int body_size; + unsigned int body_size; unsigned char **buf; int tok_type; { @@ -161,17 +161,18 @@ void g_make_token_header(mech, body_size, buf, tok_type) * mechanism in the token does not match the mech argument. buf and * *body_size are left unmodified on error. */ -gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize) +gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize_in) gss_OID mech; unsigned int *body_size; unsigned char **buf_in; int tok_type; - int toksize; + unsigned int toksize_in; { unsigned char *buf = *buf_in; int seqsize; gss_OID_desc toid; int ret = 0; + int toksize = toksize_in; if ((toksize-=1) < 0) return(G_BAD_TOK_HEADER);