summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/clnt_generic.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-08-12 14:00:26 +0000
committerpeter <peter@FreeBSD.org>1996-08-12 14:00:26 +0000
commitc2fcbeb6ff1e38452f855641439831a4746ef02a (patch)
tree5ef6d941ce8ca2df8701e926198d01206fc35900 /lib/libc/rpc/clnt_generic.c
parent633999a94babb0ab1ca53d9f3c8d9d8d70423752 (diff)
downloadFreeBSD-src-c2fcbeb6ff1e38452f855641439831a4746ef02a.zip
FreeBSD-src-c2fcbeb6ff1e38452f855641439831a4746ef02a.tar.gz
clear various struct sockaddr_in's on stack, set sin_len.
(Noticed when comparing to OpenBSD source)
Diffstat (limited to 'lib/libc/rpc/clnt_generic.c')
-rw-r--r--lib/libc/rpc/clnt_generic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c
index a529336..44b9f79 100644
--- a/lib/libc/rpc/clnt_generic.c
+++ b/lib/libc/rpc/clnt_generic.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";*/
/*static char *sccsid = "from: @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_generic.c,v 1.2 1995/05/30 05:41:14 rgrimes Exp $";
+static char *rcsid = "$Id: clnt_generic.c,v 1.3 1995/10/22 14:51:12 phk Exp $";
#endif
/*
@@ -74,6 +74,8 @@ clnt_create(hostname, prog, vers, proto)
rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
return (NULL);
}
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_len = sizeof(struct sockaddr_in);
sin.sin_family = h->h_addrtype;
sin.sin_port = 0;
bzero(sin.sin_zero, sizeof(sin.sin_zero));
OpenPOWER on IntegriCloud