ws2_32: Avoid data corruption of WSAPROTOCOL_INFO in ws_protocol_info().
commitc722d819eac5987bd0659c3e9b9fe2f4392cb501
authorDamjan Jovanovic <damjan.jov@gmail.com>
Thu, 1 Aug 2019 04:11:32 +0000 (1 06:11 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 1 Aug 2019 17:11:49 +0000 (1 19:11 +0200)
tree15c6abec6fab41ebce071f4d4f0a16698bc52f87
parent0645e6c959a8b9e32387101fbe5b9f14d5a31807
ws2_32: Avoid data corruption of WSAPROTOCOL_INFO in ws_protocol_info().

WS_EnterSingleProtocol[A/W]() fills WSAPROTOCOL_INFO with zeroes,
ovewriting what was already there, so in ws_protocol_info(),
populate the address family, socket type and protocol
only AFTER calling it.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/ws2_32/socket.c
dlls/ws2_32/tests/sock.c