[radix.c]
     fix check for overflow
This commit is contained in:
Damien Miller 2002-04-23 21:00:33 +10:00
parent f61c01506f
commit 635fe98a7f
2 changed files with 10 additions and 5 deletions

View File

@ -18,6 +18,9 @@
- stevesk@cvs.openbsd.org 2002/04/21 16:25:06
[sshconnect1.c]
spelling in error message; ok markus@
- markus@cvs.openbsd.org 2002/04/22 06:15:47
[radix.c]
fix check for overflow
20020421
- (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
@ -8284,4 +8287,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.2067 2002/04/23 10:56:02 djm Exp $
$Id: ChangeLog,v 1.2068 2002/04/23 11:00:33 djm Exp $

10
radix.c
View File

@ -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.19 2002/04/22 06:15:47 markus Exp $");
#ifdef AFS
#include <krb.h>
@ -76,15 +76,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)