krb5 commit: Expand kadmin protocol kvno range
Greg Hudson
ghudson at mit.edu
Wed Apr 15 00:40:38 EDT 2015
https://github.com/krb5/krb5/commit/49b2c5e30edf980e0f99b5fe2cdf6ff5b2a8b032
commit 49b2c5e30edf980e0f99b5fe2cdf6ff5b2a8b032
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Mar 4 17:19:56 2015 -0500
Expand kadmin protocol kvno range
Make xdr_krb5_kvno() use xdr_u_int() instead of xdr_u_char(), allowing
it to marshal kvno values up to 32 bits. This change is
backwards-compatible because XDR uses four bytes to marshal char
values and does no bounds checking of char values on decode.
ticket: 7532
src/lib/kadm5/kadm_rpc_xdr.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/src/lib/kadm5/kadm_rpc_xdr.c b/src/lib/kadm5/kadm_rpc_xdr.c
index 4ccf8e6..2bef858 100644
--- a/src/lib/kadm5/kadm_rpc_xdr.c
+++ b/src/lib/kadm5/kadm_rpc_xdr.c
@@ -136,20 +136,7 @@ xdr_krb5_timestamp(XDR *xdrs, krb5_timestamp *objp)
bool_t
xdr_krb5_kvno(XDR *xdrs, krb5_kvno *objp)
{
- unsigned char tmp;
-
- tmp = '\0'; /* for purify, else xdr_u_char performs a umr */
-
- if (xdrs->x_op == XDR_ENCODE)
- tmp = (unsigned char) *objp;
-
- if (!xdr_u_char(xdrs, &tmp))
- return (FALSE);
-
- if (xdrs->x_op == XDR_DECODE)
- *objp = (krb5_kvno) tmp;
-
- return (TRUE);
+ return xdr_u_int(xdrs, objp);
}
bool_t
More information about the cvs-krb5
mailing list