summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-04-23 21:00:33 +1000
committerDamien Miller <djm@mindrot.org>2002-04-23 21:00:33 +1000
commit635fe98a7f156688fc3182d597c88592823a3d22 (patch)
treec01ec8efeaa0ccb3f6b4c31cf9dec26108042e4e
parentf61c01506f8f78ccaacb55ba750a847486da3e5e (diff)
- markus@cvs.openbsd.org 2002/04/22 06:15:47
[radix.c] fix check for overflow
-rw-r--r--ChangeLog5
-rw-r--r--radix.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 23d4fd1d8..b7405813c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
18 - stevesk@cvs.openbsd.org 2002/04/21 16:25:06 18 - stevesk@cvs.openbsd.org 2002/04/21 16:25:06
19 [sshconnect1.c] 19 [sshconnect1.c]
20 spelling in error message; ok markus@ 20 spelling in error message; ok markus@
21 - markus@cvs.openbsd.org 2002/04/22 06:15:47
22 [radix.c]
23 fix check for overflow
21 24
2220020421 2520020421
23 - (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0). 26 - (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
@@ -8284,4 +8287,4 @@
8284 - Wrote replacements for strlcpy and mkdtemp 8287 - Wrote replacements for strlcpy and mkdtemp
8285 - Released 1.0pre1 8288 - Released 1.0pre1
8286 8289
8287$Id: ChangeLog,v 1.2067 2002/04/23 10:56:02 djm Exp $ 8290$Id: ChangeLog,v 1.2068 2002/04/23 11:00:33 djm Exp $
diff --git a/radix.c b/radix.c
index 94e3dc70e..85ca9c329 100644
--- a/radix.c
+++ b/radix.c
@@ -26,7 +26,7 @@
26#include "includes.h" 26#include "includes.h"
27#include "uuencode.h" 27#include "uuencode.h"
28 28
29RCSID("$OpenBSD: radix.c,v 1.18 2002/04/20 09:17:19 markus Exp $"); 29RCSID("$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