Re: WS_getpeername buffer length fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Jan 2002, Paul Rupe wrote:

> While running the Win32 version of perl under Wine (don't ask), I
> noticed that WS_getpeername wasn't returning the length of the output if
> the buffer was larger than needed.  The app was calling getpeername with
> a 256-byte buffer and expecting *namelen to be 16 afterward.  The most
> logical place to fix this was in ws_sockaddr_u2ws.  Other APIs call this
> function, but I think they would also expect the same behavior so it
> should be ok.

   sorry to reply so late. I think your fix is a good one but with the
patch you sent ws_sockaddr_u2ws never returns -1 anymore. This means the
functions that call it will not do " WSAEFAULT
>
> The one-line addition below takes care of the problem.
>
> Changelog:
>   dlls/winsock/socket.c
>   Paul Rupe <prupe@nc.rr.com>
>   Return length of WS_sockaddr structure in ws_sockaddr_u2ws.
>
>
>






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux