Patch #: 48 Type: bug fix Priority: medium Affects: use of 'ash' on SPARC architectures Reported: Akira Sawada Archived: munnari.OZ.AU mac/cap.patches/cap60.patch048 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch048' Summary: use bcopy() to pick up possibly unaligned word data File: cap60/lib/afp/afpcmd.c *** lib/afp/afpcmd.c.orig Thu Feb 28 23:43:21 1991 --- lib/afp/afpcmd.c Wed Aug 21 00:41:25 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/02/15 22:34:59 $ ! * $Header: afpcmd.c,v 2.1 91/02/15 22:34:59 djh Rel $ ! * $Revision: 2.1 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/08/20 14:41:03 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpcmd.c,v 2.2 1991/08/20 14:41:03 djh Rel djh $ ! * $Revision: 2.2 $ */ /* *************** *** 382,393 **** *si += (*s)+1; break; case P_OSTR: /* offset string */ ! sos = ntohs(*(word *)s); /* pick up offset from base */ *si += 2; cpyp2cstr(d,&src[sos]); /* copy string */ break; case P_OPTH: ! sos = ntohs(*(word *)s); /* pick up offset from base */ *si += 2; bcopy(&src[sos],d,(int)src[sos]+1); /* copy string */ break; --- 382,395 ---- *si += (*s)+1; break; case P_OSTR: /* offset string */ ! bcopy(s,&sos,sizeof(word)); /* pick up offset from base */ ! sos = ntohs(sos); *si += 2; cpyp2cstr(d,&src[sos]); /* copy string */ break; case P_OPTH: ! bcopy(s,&sos,sizeof(word)); /* pick up offset from base */ ! sos = ntohs(sos); *si += 2; bcopy(&src[sos],d,(int)src[sos]+1); /* copy string */ break; *************** *** 396,402 **** *si += (*s)+1; break; case P_OPTR: ! sos = ntohs(*(word *)s); /* pick up offset from base */ *si += 2; *((char **)d) = (char *)&src[sos]; break; --- 398,405 ---- *si += (*s)+1; break; case P_OPTR: ! bcopy(s,&sos,sizeof(word)); /* pick up offset from base */ ! sos = ntohs(sos); *si += 2; *((char **)d) = (char *)&src[sos]; break; *** README.orig Wed Aug 21 00:42:18 1991 --- README Wed Aug 21 00:42:44 1991 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 47, August 1991 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 48, August 1991 Introduction ------------