diff options
author | gibbs <gibbs@FreeBSD.org> | 1995-01-25 05:40:00 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1995-01-25 05:40:00 +0000 |
commit | a7eba01d1347ea5dee7a64b2f1b6a6c5257b0ebb (patch) | |
tree | 41f9f919498d994f1b7ea33debfcf789efd3ec9b | |
parent | 34f0314cd823d2b0b92f885e4f1328cee2ca72a9 (diff) | |
download | FreeBSD-src-a7eba01d1347ea5dee7a64b2f1b6a6c5257b0ebb.zip FreeBSD-src-a7eba01d1347ea5dee7a64b2f1b6a6c5257b0ebb.tar.gz |
bzero hostdata in send_to_kdc so that if we immediately jump to the
cleanup routine, we don't look at bogus data to determine wheter or not
to free the fields of the hostdata struct. This cures the "klogin segfaults
when no kerberos servers are availible" problem.
-rw-r--r-- | eBones/krb/send_to_kdc.c | 3 | ||||
-rw-r--r-- | eBones/lib/libkrb/send_to_kdc.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/eBones/krb/send_to_kdc.c b/eBones/krb/send_to_kdc.c index aeaf389..15e4220 100644 --- a/eBones/krb/send_to_kdc.c +++ b/eBones/krb/send_to_kdc.c @@ -4,7 +4,7 @@ * <Copyright.MIT>. * * from: send_to_kdc.c,v 4.20 90/01/02 13:40:37 jtkohl Exp $ - * $Id: send_to_kdc.c,v 1.2 1994/07/19 19:26:21 g89r4222 Exp $ + * $Id: send_to_kdc.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $ */ #ifndef lint @@ -121,6 +121,7 @@ send_to_kdc(pkt,rpkt,realm) hostlist = (struct hostent *) malloc(sizeof(struct hostent)); if (!hostlist) return (/*errno */SKDC_CANT); + bzero(hostlist, sizeof(struct hostent)); if ((f = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { if (krb_debug) fprintf(stderr,"%s: Can't open socket\n", prog); diff --git a/eBones/lib/libkrb/send_to_kdc.c b/eBones/lib/libkrb/send_to_kdc.c index aeaf389..15e4220 100644 --- a/eBones/lib/libkrb/send_to_kdc.c +++ b/eBones/lib/libkrb/send_to_kdc.c @@ -4,7 +4,7 @@ * <Copyright.MIT>. * * from: send_to_kdc.c,v 4.20 90/01/02 13:40:37 jtkohl Exp $ - * $Id: send_to_kdc.c,v 1.2 1994/07/19 19:26:21 g89r4222 Exp $ + * $Id: send_to_kdc.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $ */ #ifndef lint @@ -121,6 +121,7 @@ send_to_kdc(pkt,rpkt,realm) hostlist = (struct hostent *) malloc(sizeof(struct hostent)); if (!hostlist) return (/*errno */SKDC_CANT); + bzero(hostlist, sizeof(struct hostent)); if ((f = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { if (krb_debug) fprintf(stderr,"%s: Can't open socket\n", prog); |