[prev in list] [next in list] [prev in thread] [next in thread]
List: nssldap
Subject: Re: [nssldap] bug in nss_ldap 201
From: Luke Howard <lukeh () PADL ! COM>
Date: 2002-09-20 5:52:17
[Download RAW message or body]
Thanks, should be in nss_ldap-202.
cheers,
-- Luke
>From: "Howard Chu" <hyc@highlandsun.com>
>Subject: [nssldap] bug in nss_ldap 201
>To: <nssldap@padl.com>
>Date: Thu, 19 Sep 2002 15:40:04 -0700
>
>getsockname and getpeername can be called with uninit'd namelen's. This gets
>a SEGV on Solaris 2.7. On my system this always caused a problem in rshd from
>a remote box. (But not rsh thru localhost - good ol' stack garbage for ya...)
>
>Here's the fix:
>
>rebec:~/padl/nss_ldap> cvs diff -u ldap-nss.c
>Index: ldap-nss.c
>===================================================================
>RCS file: /var/CVSROOT/nss_ldap/ldap-nss.c,v
>retrieving revision 1.2
>diff -u -r1.2 ldap-nss.c
>--- ldap-nss.c 19 Sep 2002 18:10:02 -0000 1.2
>+++ ldap-nss.c 19 Sep 2002 22:16:53 -0000
>@@ -648,8 +648,8 @@
> {
> struct sockaddr sockname;
> struct sockaddr peername;
>- int socknamelen;
>- int peernamelen;
>+ int socknamelen = sizeof(sockname);
>+ int peernamelen = sizeof(peername);
>
> /*
> * Important to perform comparison "family-aware" to not count
>
> -- Howard Chu
> Chief Architect, Symas Corp. Director, Highland Sun
> http://www.symas.com http://highlandsun.com/hyc
> Symas: Premier OpenSource Development and Support
>
--
Luke Howard | PADL Software Pty Ltd | www.padl.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic