delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/29/13:12:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 29 Mar 2002 13:11:30 -0500
From: Christopher Faylor <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: sendto bug
Message-ID: <20020329181130.GG2505@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT GSO DOT 4 DOT 30L DOT 0203291203430 DOT 28627-100000 AT magic-pi-ball DOT mit DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.30L.0203291203430.28627-100000@magic-pi-ball.mit.edu>
User-Agent: Mutt/1.3.23.1i

On Fri, Mar 29, 2002 at 12:13:22PM -0500, David E Euresti wrote:
>	I believe the implementation of sendto in cygwin.dll has a bug.
>The following code works on linux but not on cygwin.  I believe the reason
>is that cygwin checks whether the to field is null however it is
>absolutely permissible for the to field to be null, as seen in the
>following line at net.cc
>
>  if ((len && __check_invalid_read_ptr_errno (buf, (unsigned) len))
>      || __check_null_invalid_struct_errno (to, tolen)
>      || !h)
>
>I think that if we replace this with
>  if ((len && __check_invalid_read_ptr_errno (buf, (unsigned) len))
>      || to && __check_null_invalid_struct_errno (to, tolen)
>      || !h)
>
>and then make sure the get_inet_addr doesn't get called it would work
>correctly, as both WSAsendto and winsock 1 sendto accept null to's.

I don't see anything in the linux man page or the Single UNIX Specification
which indicates that the "to" address can be NULL.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019