]> andersk Git - openssh.git/blobdiff - radix.c
- (stevesk) [acconfig.h auth-passwd.c configure.ac sshd.c] HP-UX 10.26
[openssh.git] / radix.c
diff --git a/radix.c b/radix.c
index 94e3dc70eb3eb262bfdb39a63374fb458a254c97..019d7a3f99628956b4ede1ae4178ed5b1e10ffd7 100644 (file)
--- a/radix.c
+++ b/radix.c
@@ -26,7 +26,7 @@
 #include "includes.h"
 #include "uuencode.h"
 
-RCSID("$OpenBSD: radix.c,v 1.18 2002/04/20 09:17:19 markus Exp $");
+RCSID("$OpenBSD: radix.c,v 1.20 2002/04/23 12:58:26 markus Exp $");
 
 #ifdef AFS
 #include <krb.h>
@@ -65,8 +65,7 @@ creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
        buffer_put_short(&b, creds->kvno);
 
        /* 32 bit size + data */
-       buffer_put_string(&b, creds->ticket_st.dat,
-           sizeof(creds->ticket_st.length));
+       buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length);
 
        ret = uuencode(buffer_ptr(&b), buffer_len(&b), (char *)buf, buflen);
 
@@ -76,15 +75,17 @@ creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
 
 #define GETSTRING(b, t, tlen) \
        do { \
-               int i; \
+               int i, found = 0; \
                for (i = 0; i < tlen; i++) { \
                        if (buffer_len(b) == 0) \
                                goto done; \
                        t[i] = buffer_get_char(b); \
-                       if (t[i] == '\0') \
+                       if (t[i] == '\0') { \
+                               found = 1; \
                                break; \
+                       } \
                } \
-               if (t[i] != '\0') \
+               if (!found) \
                        goto done; \
        } while(0)
 
This page took 0.032366 seconds and 4 git commands to generate.