summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/radix.c
diff options
context:
space:
mode:
authorDug Song <dugsong@cvs.openbsd.org>1999-09-29 18:16:24 +0000
committerDug Song <dugsong@cvs.openbsd.org>1999-09-29 18:16:24 +0000
commit18b0e3d63d164640aae60cdba4b8171c56a9e1f1 (patch)
treec6a16fe7937f965dd34829c6c0effc5b80c2ba77 /usr.bin/ssh/radix.c
parent0d39821d0d77161333749fc800238b94cde1aef0 (diff)
update krb4/AFS support to ssh-1.2.27-afs-kerberos-pl1 level, clean up unused variables, update manpages
Diffstat (limited to 'usr.bin/ssh/radix.c')
-rw-r--r--usr.bin/ssh/radix.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/ssh/radix.c b/usr.bin/ssh/radix.c
index ca1b82a72db..c1564383693 100644
--- a/usr.bin/ssh/radix.c
+++ b/usr.bin/ssh/radix.c
@@ -5,14 +5,13 @@
Originally written by Mark Riordan 12 August 1990 and 17 Feb 1991
and placed in the public domain.
- dugsong@UMICH.EDU
+ Dug Song <dugsong@UMICH.EDU>
*/
#include "includes.h"
#ifdef AFS
#include <krb.h>
-#include <kafs.h>
char six2pr[64] = {
'A','B','C','D','E','F','G','H','I','J','K','L','M',
@@ -52,7 +51,7 @@ int uuencode(unsigned char *bufin, unsigned int nbytes, char *bufcoded)
int uudecode(const char *bufcoded, unsigned char *bufplain, int outbufsize)
{
/* single character decode */
-#define DEC(c) pr2six[c]
+#define DEC(c) pr2six[(unsigned char)c]
#define MAXVAL 63
static int first = 1;
@@ -75,7 +74,7 @@ int uudecode(const char *bufcoded, unsigned char *bufplain, int outbufsize)
If this would decode into more bytes than would fit into
the output buffer, adjust the number of input bytes downwards. */
bufin = bufcoded;
- while (pr2six[(unsigned char)*(bufin++)] <= MAXVAL);
+ while (DEC(*(bufin++)) <= MAXVAL);
nprbytes = bufin - bufcoded - 1;
nbytesdecoded = ((nprbytes+3)/4) * 3;
if (nbytesdecoded > outbufsize)
@@ -91,7 +90,7 @@ int uudecode(const char *bufcoded, unsigned char *bufplain, int outbufsize)
nprbytes -= 4;
}
if (nprbytes & 03) {
- if (pr2six[bufin[-2]] > MAXVAL)
+ if (DEC(bufin[-2]) > MAXVAL)
nbytesdecoded -= 2;
else
nbytesdecoded -= 1;