diff options
Diffstat (limited to 'radix.c')
-rw-r--r-- | radix.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -26,7 +26,7 @@ | |||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | #include "uuencode.h" | 27 | #include "uuencode.h" |
28 | 28 | ||
29 | RCSID("$OpenBSD: radix.c,v 1.18 2002/04/20 09:17:19 markus Exp $"); | 29 | RCSID("$OpenBSD: radix.c,v 1.19 2002/04/22 06:15:47 markus Exp $"); |
30 | 30 | ||
31 | #ifdef AFS | 31 | #ifdef AFS |
32 | #include <krb.h> | 32 | #include <krb.h> |
@@ -76,15 +76,17 @@ creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen) | |||
76 | 76 | ||
77 | #define GETSTRING(b, t, tlen) \ | 77 | #define GETSTRING(b, t, tlen) \ |
78 | do { \ | 78 | do { \ |
79 | int i; \ | 79 | int i, found = 0; \ |
80 | for (i = 0; i < tlen; i++) { \ | 80 | for (i = 0; i < tlen; i++) { \ |
81 | if (buffer_len(b) == 0) \ | 81 | if (buffer_len(b) == 0) \ |
82 | goto done; \ | 82 | goto done; \ |
83 | t[i] = buffer_get_char(b); \ | 83 | t[i] = buffer_get_char(b); \ |
84 | if (t[i] == '\0') \ | 84 | if (t[i] == '\0') { \ |
85 | found = 1; \ | ||
85 | break; \ | 86 | break; \ |
87 | } \ | ||
86 | } \ | 88 | } \ |
87 | if (t[i] != '\0') \ | 89 | if (!found) \ |
88 | goto done; \ | 90 | goto done; \ |
89 | } while(0) | 91 | } while(0) |
90 | 92 | ||