* rd_safe.c (krb_rd_safe): use KRB4_32 for address comparison
authorMark Eichin <eichin@mit.edu>
Wed, 28 Jun 1995 03:59:01 +0000 (03:59 +0000)
committerMark Eichin <eichin@mit.edu>
Wed, 28 Jun 1995 03:59:01 +0000 (03:59 +0000)
and checksum swapping.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6176 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb4/ChangeLog
src/lib/krb4/rd_safe.c

index 9678a9d2ac4c167cd8ec468e51922bc0dcce571d..0177792159947766a2adf4ff489e372b56ffa3d8 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jun 27 23:50:08 1995  Mark Eichin  <eichin@cygnus.com>
+
+       * 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
index e1ea236ad178a8982df4f889227e8206c7fa55f9..1135e801ccd5fd914cca950b30a6edc6bdfdc402 100644 (file)
@@ -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;