From: Greg Hudson Date: Sat, 26 Jun 2010 17:37:20 +0000 (+0000) Subject: Fix a bug in r24147 where svctcp_create() was passing the wrong length X-Git-Tag: krb5-1.9-beta1~179 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f60caed6109becf905845e0c2e44c41f499f46b4;p=krb5.git Fix a bug in r24147 where svctcp_create() was passing the wrong length argument to bind(), causing it to fail on Solaris. ticket: 6746 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24148 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c index b9aee070f..3ae39ee8c 100644 --- a/src/lib/rpc/svc_tcp.c +++ b/src/lib/rpc/svc_tcp.c @@ -175,7 +175,7 @@ svctcp_create( sin.sin_family = AF_INET; if (bindresvport(sock, &sin)) { sin.sin_port = 0; - (void)bind(sock, (struct sockaddr *)&sin, len); + (void)bind(sock, (struct sockaddr *)&sin, sizeof(sin)); } if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) { perror("svc_tcp.c - cannot getsockname");