ws2_32: Fix parameter validation order in getpeername.

Andrew Nguyen arethusa26 at gmail.com
Tue Feb 2 15:58:08 CST 2010


On Tue, Feb 2, 2010 at 4:58 AM, Alexandre Julliard <julliard at winehq.org> wrote:
> Andrew Nguyen <arethusa26 at gmail.com> writes:
>
>> Invalid pointers appear to be handled by getpeername in all versions
>> of Windows, so adding an exception handler seems to be justified.
>
> It's only justified if there is a real app that passes a bad pointer
> that is not the result of some other Wine bug. Please provide more
> details.
>
> --
> Alexandre Julliard
> julliard at winehq.org
>

Well, I noticed via tests that getpeername returns WSAEFAULT instead
of crashing when invalid pointers are passed. I'm not aware of any app
that does this, and I see your point about exception handling, so I
will resend another version.



More information about the wine-devel mailing list