Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: Wed, 27 Nov 2002 19:01:13 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Incorrect return values from sendto Message-ID: <20021128000113.GL17798@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i On Wed, Nov 27, 2002 at 11:18:26PM +0100, Mikael Ylikoski wrote: >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 }; Looks like you're right. Nice catch. I've checked in a fix. It will be in 1.3.17. You got this in just in time. Thanks. cgf -- Please do not send me personal email with cygwin questions or observations. Use the resources at http://cygwin.com/ . -- 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/