This is the mail archive of the
mailing list for the Cygwin project.
Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff.
- To: "Corinna Vinschen" <cygwin at cygwin dot com>
- Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff.
- From: "Mike Thomas" <miketh at brisbane dot paradigmgeo dot com>
- Date: Mon, 6 Aug 2001 09:51:46 +1000
- References: <firstname.lastname@example.org> <20010803140704.W23782@cygbert.vinschen.de>
Thanks for the help Corinna - much appreciated.
----- Original Message -----
From: Corinna Vinschen <email@example.com>
Sent: Friday, August 03, 2001 10:07 PM
Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other
> On Wed, Aug 01, 2001 at 01:25:29PM +1000, Mike Thomas wrote:
> > return accept (sockfd, (struct sockaddr *) NULL, NULL);
> Should work now in the next developers snapshot.
> > 1. socket.h does not include a type "socklen_t" which is apparently
> > on some Unix platforms.
> Defined as `int' in cygwin/socket.h now.
> > 2. Although not relevant to the code above, I noticed while looking in
> > socket.h and friends that Cygwin provides sockaddr and sockaddr_un,
> > differ in terms of how much space is made for the name of the socket.
> > sockaddr member sa_data is only very short (14 bytes, compared to
> > UNIX_PATH_LEN for the sun_path member of sockaddr_un) which would not
> > suffice for a long file name. Unfortunately accept is defined in terms
> > sockaddr rather than sockaddr_un which could potentially cause string
> > overwrites.
> Should be no problem. Winsock accept doesn't know about AF_UNIX sockets.
> They are faked using AF_INET sockets in Cygwin.
> Hope, that helps,
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Developer mailto:firstname.lastname@example.org
> Red Hat, Inc.
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html