summaryrefslogtreecommitdiffstats
path: root/radix.c
diff options
context:
space:
mode:
Diffstat (limited to 'radix.c')
-rw-r--r--radix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/radix.c b/radix.c
index 9d1c999a..03377334 100644
--- a/radix.c
+++ b/radix.c
@@ -69,7 +69,7 @@ typedef unsigned short my_u_short;
int
-creds_to_radix(CREDENTIALS *creds, unsigned char *buf)
+creds_to_radix(CREDENTIALS *creds, unsigned char *buf, size_t buflen)
{
char *p, *s;
int len;
@@ -119,7 +119,7 @@ creds_to_radix(CREDENTIALS *creds, unsigned char *buf)
p += creds->ticket_st.length;
len = p - temp;
- return (uuencode((unsigned char *)temp, len, (char *)buf));
+ return (uuencode((unsigned char *)temp, len, (char *)buf, buflen));
}
int
@@ -131,7 +131,8 @@ radix_to_creds(const char *buf, CREDENTIALS *creds)
char version;
char temp[2048];
- if (!(len = uudecode(buf, (unsigned char *)temp, sizeof(temp))))
+ len = uudecode(buf, (unsigned char *)temp, sizeof(temp));
+ if (len < 0)
return 0;
p = temp;