svn rev #24745: trunk/src/lib/gssapi/generic/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Mar 25 11:50:06 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24745
Commit By: ghudson
Log Message:
Fix a precedence error in g_make_token_header() which caused it to
write the wrong length when no token type is passed.
(From r24739 in users/lhoward/moonshot-mechglue-fixes.)
Changed Files:
U trunk/src/lib/gssapi/generic/util_token.c
Modified: trunk/src/lib/gssapi/generic/util_token.c
===================================================================
--- trunk/src/lib/gssapi/generic/util_token.c 2011-03-25 15:46:03 UTC (rev 24744)
+++ trunk/src/lib/gssapi/generic/util_token.c 2011-03-25 15:50:06 UTC (rev 24745)
@@ -133,7 +133,7 @@
g_token_size(const gss_OID_desc * mech, unsigned int body_size)
{
/* set body_size to sequence contents size */
- body_size += 4 + (int) mech->length; /* NEED overflow check */
+ body_size += 4 + (unsigned int)mech->length; /* NEED overflow check */
return(1 + der_length_size(body_size) + body_size);
}
@@ -148,7 +148,7 @@
int tok_type)
{
*(*buf)++ = 0x60;
- der_write_length(buf, (tok_type == -1) ?2:4 + mech->length + body_size);
+ der_write_length(buf, ((tok_type == -1) ? 2 : 4) + mech->length + body_size);
*(*buf)++ = 0x06;
*(*buf)++ = (unsigned char) mech->length;
TWRITE_STR(*buf, mech->elements, mech->length);
More information about the cvs-krb5
mailing list