Fixed stack overwrite by using sizeof(WS_sockaddr_ipx).

This commit is contained in:
Marcus Meissner 2005-04-28 18:27:27 +00:00 committed by Alexandre Julliard
parent 95a58eba7d
commit c4d25aec20
1 changed files with 2 additions and 2 deletions

View File

@ -1704,8 +1704,8 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
* only "one" device active and further it is not possible to query things like the linkspeed.
*/
FIXME("IPX_ADDRESS\n");
namelen = sizeof(struct WS_sockaddr);
memset(&addr, 0, sizeof(struct WS_sockaddr));
namelen = sizeof(struct WS_sockaddr_ipx);
memset(&addr, 0, sizeof(struct WS_sockaddr_ipx));
WS_getsockname(s, (struct WS_sockaddr*)&addr, &namelen);
data = (IPX_ADDRESS_DATA*)optval;