This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sendto bug


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]