From 349952204fa0cf2328271e1eb11ef88472f92e96 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Wed, 28 Jun 1995 03:59:01 +0000 Subject: [PATCH] * rd_safe.c (krb_rd_safe): use KRB4_32 for address comparison and checksum swapping. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6176 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 4 ++++ src/lib/krb4/rd_safe.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 9678a9d2a..017779215 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,7 @@ +Tue Jun 27 23:50:08 1995 Mark Eichin + + * rd_safe.c (krb_rd_safe): use KRB4_32 for address comparison + and checksum swapping. Tue Jun 27 15:49:35 EDT 1995 Paul Park (pjpark@mit.edu) * kparse.c - Change LineNbr to sLineNbr to avoid conflict with kparse.h diff --git a/src/lib/krb4/rd_safe.c b/src/lib/krb4/rd_safe.c index e1ea236ad..1135e801c 100644 --- a/src/lib/krb4/rd_safe.c +++ b/src/lib/krb4/rd_safe.c @@ -115,7 +115,8 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)"); /* don't swap, net order always */ p += sizeof(src_addr); - if (!krb_ignore_ip_address && src_addr != (u_long) sender->sin_addr.s_addr) + if (!krb_ignore_ip_address && + src_addr != (unsigned KRB4_32) sender->sin_addr.s_addr) return RD_AP_MODIFIED; /* safely get time_sec */ @@ -168,8 +169,8 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)"); memcpy((char *)big_cksum, (char *)p, sizeof(big_cksum)); if (swap_bytes) { /* swap_u_16(big_cksum); */ - unsigned long tt, *bb; - bb = (unsigned long*)big_cksum; + unsigned KRB4_32 tt, *bb; + bb = (unsigned KRB4_32*)big_cksum; tt = bb[0]; swap_u_long(tt); bb[0] = tt; tt = bb[1]; swap_u_long(tt); bb[1] = tt; tt = bb[2]; swap_u_long(tt); bb[2] = tt; -- 2.26.2