|
@ -50,7 +50,7 @@ |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
#if defined(LIBC_SCCS) && !defined(lint) |
|
|
#if defined(LIBC_SCCS) && !defined(lint) |
|
|
static char rcsid[] = "$OpenBSD: crypt.c,v 1.8 1997/03/27 23:26:28 downsj Exp $"; |
|
|
|
|
|
|
|
|
static char rcsid[] = "$OpenBSD: crypt.c,v 1.9 1997/03/27 23:36:53 downsj Exp $"; |
|
|
#endif /* LIBC_SCCS and not lint */ |
|
|
#endif /* LIBC_SCCS and not lint */ |
|
|
|
|
|
|
|
|
#include <sys/types.h> |
|
|
#include <sys/types.h> |
|
@ -621,7 +621,7 @@ crypt(key, setting) |
|
|
* and padding with zeros. |
|
|
* and padding with zeros. |
|
|
*/ |
|
|
*/ |
|
|
q = (u_char *) keybuf; |
|
|
q = (u_char *) keybuf; |
|
|
while ((q - (u_char *) keybuf) <= sizeof(keybuf)) { |
|
|
|
|
|
|
|
|
while ((q - (u_char *) keybuf) < sizeof(keybuf)) { |
|
|
if (*q++ = *key << 1) |
|
|
if (*q++ = *key << 1) |
|
|
key++; |
|
|
key++; |
|
|
} |
|
|
} |
|
@ -650,7 +650,7 @@ crypt(key, setting) |
|
|
* And XOR with the next 8 characters of the key. |
|
|
* And XOR with the next 8 characters of the key. |
|
|
*/ |
|
|
*/ |
|
|
q = (u_char *) keybuf; |
|
|
q = (u_char *) keybuf; |
|
|
while (((q - (u_char *) keybuf) <= sizeof(keybuf)) && |
|
|
|
|
|
|
|
|
while (((q - (u_char *) keybuf) < sizeof(keybuf)) && |
|
|
*key) |
|
|
*key) |
|
|
*q++ ^= *key++ << 1; |
|
|
*q++ ^= *key++ << 1; |
|
|
|
|
|
|
|
|