- markus@cvs.openbsd.org 2002/04/22 06:15:47
[radix.c] fix check for overflow
This commit is contained in:
parent
f61c01506f
commit
635fe98a7f
|
@ -18,6 +18,9 @@
|
||||||
- stevesk@cvs.openbsd.org 2002/04/21 16:25:06
|
- stevesk@cvs.openbsd.org 2002/04/21 16:25:06
|
||||||
[sshconnect1.c]
|
[sshconnect1.c]
|
||||||
spelling in error message; ok markus@
|
spelling in error message; ok markus@
|
||||||
|
- markus@cvs.openbsd.org 2002/04/22 06:15:47
|
||||||
|
[radix.c]
|
||||||
|
fix check for overflow
|
||||||
|
|
||||||
20020421
|
20020421
|
||||||
- (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
|
- (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
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- 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
10
radix.c
|
@ -26,7 +26,7 @@
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "uuencode.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
|
#ifdef AFS
|
||||||
#include <krb.h>
|
#include <krb.h>
|
||||||
|
@ -76,15 +76,17 @@ creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
|
||||||
|
|
||||||
#define GETSTRING(b, t, tlen) \
|
#define GETSTRING(b, t, tlen) \
|
||||||
do { \
|
do { \
|
||||||
int i; \
|
int i, found = 0; \
|
||||||
for (i = 0; i < tlen; i++) { \
|
for (i = 0; i < tlen; i++) { \
|
||||||
if (buffer_len(b) == 0) \
|
if (buffer_len(b) == 0) \
|
||||||
goto done; \
|
goto done; \
|
||||||
t[i] = buffer_get_char(b); \
|
t[i] = buffer_get_char(b); \
|
||||||
if (t[i] == '\0') \
|
if (t[i] == '\0') { \
|
||||||
|
found = 1; \
|
||||||
break; \
|
break; \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
if (t[i] != '\0') \
|
if (!found) \
|
||||||
goto done; \
|
goto done; \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue