This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Incorrect return values from sendto
- From: Mikael Ylikoski <my at post dot utfors dot se>
- To: cygwin at cygwin dot com
- Date: Wed, 27 Nov 2002 23:18:26 +0100 (CET)
- Subject: Incorrect return values from sendto
There is a bug in sendto in cygwin-1.3.16 which can cause an uninitialized
value to be returned.
--- fhandler_socket.cc.orig Mon Nov 25 23:15:37 2002
+++ fhandler_socket.cc Mon Nov 25 23:16:32 2002
@@ -862,9 +862,9 @@
DWORD ret;
if (!winsock2_active)
- res = ::sendto (get_socket (), (const char *) ptr, len,
- flags & MSG_WINMASK,
- (to ? (const struct sockaddr *) &sin : NULL), tolen);
+ res = ret = ::sendto (get_socket (), (const char *) ptr, len,
+ flags & MSG_WINMASK,
+ (to ? (const struct sockaddr *) &sin : NULL), tolen);
else
{
WSABUF wsabuf = { len, (char *) ptr };
/Mikael
--
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/