[3802] in Athena Bugs
crypt.c
daemon@ATHENA.MIT.EDU (Jon A. Rochlis)
Mon Dec 11 00:33:37 1989
From: jon@MIT.EDU (Jon A. Rochlis)
Date: Mon, 11 Dec 89 00:33:18 -0500
To: bugs@ATHENA.MIT.EDU
See the comment for the bug and the fix. This one probably wants to
go back to Berkeley.
-- Jon
*** /paris/source/4.3/lib/libc/gen/crypt.c Sun Mar 9 22:45:15 1986
--- crypt.c Mon Dec 11 00:31:17 1989
***************
*** 1,7 ****
#if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)crypt.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
/*
* This program implements the
* Proposed Federal Information Processing
--- 1,14 ----
#if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)crypt.c 5.21 (Berkeley/MIT) 3/9/86-12/10/89";
#endif LIBC_SCCS and not lint
+ /* Modified 10 December 1989 by Jon Rochlis, MIT Network Services.
+ This code declared two char arrays L[32], R[32] and expected them
+ to be contiguous (i.e. the code references L[33] and expects to get R[0].
+ This lost on the MAC under MPW 3.0 ... Changing it to be L[64] and
+ R = &L[32] seems to have done the trick.
+ */
+
/*
* This program implements the
* Proposed Federal Information Processing
***************
*** 226,232 ****
/*
* The current block, divided into 2 halves.
*/
! static char L[32], R[32];
static char tempL[32];
static char f[32];
--- 233,239 ----
/*
* The current block, divided into 2 halves.
*/
! static char L[64];
static char tempL[32];
static char f[32];
***************
*** 244,249 ****
--- 251,257 ----
{
int i, ii;
register t, j, k;
+ static char *R= &L[32];
/*
* First, permute the bits in the input