ws2_32: Only examine lower-order bits in getsockopt/setsockopt

Detlef Riekenberg wine.dev at web.de
Thu Aug 20 16:52:15 CDT 2009


On Do, 2009-08-20 at 17:58 +0200, Alexandre Julliard wrote:
> Juan Lang <juan.lang at gmail.com> writes:
> 
> > @@ -1779,6 +1779,8 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
> >      TRACE("socket: %04lx, level 0x%x, name 0x%x, ptr %p, len %d\n",
> >            s, level, optname, optval, *optlen);
> >  
> > +    /* Some apps sign-extend the level, so mask off the higher-order bits */
> > +    level &= 0x0000ffff;
> 
> There can be several other ways to handle this, it needs test cases to
> determine which way Windows is using.

When reading the log in the bug, the WSAAsyncGetHostByName16 is the
indicator for an 16bit app. 

Attached is my diff from last year for that code.

-- 
 
By by ... Detlef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff_ws2_32.txt
Type: text/x-patch
Size: 1985 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090820/c6d7e4c5/attachment.bin>


More information about the wine-devel mailing list