From: Ken Raeburn Date: Tue, 27 Jun 2000 18:44:32 +0000 (+0000) Subject: * krb.h (krb4_swab16): Mask upper byte of input after shifting, in case the X-Git-Tag: krb5-1.3-alpha1~2087 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5cd3ec8ce43d4f09a69ff07b28c2c60efa3fc0d6;p=krb5.git * krb.h (krb4_swab16): Mask upper byte of input after shifting, in case the input value is a signed short. (krb4_swab32): Mask high byte of input value after shifting, to avoid "time out of bounds" error when byte orders are different and low byte of timestamp has its high bit set and the timestamp is stored as a signed value. (krb_get_err_text): Don't use "errno" as an argument name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12439 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/kerberosIV/ChangeLog b/src/include/kerberosIV/ChangeLog index 767d83566..9954dca79 100644 --- a/src/include/kerberosIV/ChangeLog +++ b/src/include/kerberosIV/ChangeLog @@ -1,3 +1,18 @@ +2000-06-02 Ken Raeburn + + * krb.h (krb4_swab16): Mask upper byte of input after shifting, in + case the input value is a signed short. + +2000-05-18 Ken Raeburn + + * krb.h (krb4_swab32): Mask high byte of input value after + shifting, to avoid "time out of bounds" error when byte orders are + different and low byte of timestamp has its high bit set and the + timestamp is stored as a signed value. + + * krb.h (krb_get_err_text): Don't use "errno" as an argument + name. + Mon Mar 15 15:58:34 1999 Tom Yu * des.h: Fix GSS_DLLIMP. diff --git a/src/include/kerberosIV/krb.h b/src/include/kerberosIV/krb.h index fe8830be4..4e2b675b7 100644 --- a/src/include/kerberosIV/krb.h +++ b/src/include/kerberosIV/krb.h @@ -340,8 +340,8 @@ typedef struct msg_dat MSG_DAT; /* * New byte swapping routines, much cleaner */ -#define krb4_swab16(val) (((val) >> 8) | ((val) << 8)) -#define krb4_swab32(val) (((val)>>24) | (((val)>>8)&0xFF00) | \ +#define krb4_swab16(val) ((((val) >> 8)&0xFF) | ((val) << 8)) +#define krb4_swab32(val) ((((val)>>24)&0xFF) | (((val)>>8)&0xFF00) | \ (((val)<<8)&0xFF0000) | ((val)<<24)) /* Kerberos ticket flag field bit definitions */ @@ -466,7 +466,7 @@ KRB5_DLLIMP int KRB5_CALLCONV dest_tkt PROTOTYPE((void)); /* err_txt.c */ KRB5_DLLIMP const char FAR * KRB5_CALLCONV krb_get_err_text - PROTOTYPE((int errno)); + PROTOTYPE((int errnum)); /* g_ad_tkt.c */ int get_ad_tkt PROTOTYPE((char *service, char *sinst, char *realm, int lifetime));