Mike Kaplinskiy : ws2_32: Remember to convert ports to network byte order.
Alexandre Julliard
julliard at winehq.org
Tue Sep 15 17:47:13 CDT 2009
Module: wine
Branch: master
Commit: 13eef3d691cf555684a2a3ff55c08c1232fdddf2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13eef3d691cf555684a2a3ff55c08c1232fdddf2
Author: Mike Kaplinskiy <mike.kaplinskiy at gmail.com>
Date: Sun Sep 13 17:54:54 2009 -0400
ws2_32: Remember to convert ports to network byte order.
---
dlls/ws2_32/socket.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index ab88925..c3ee046 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4959,7 +4959,7 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
ptrPort = strchr(workBuffer, ':');
if(ptrPort)
{
- ((LPSOCKADDR_IN)lpAddress)->sin_port = (WS_u_short)atoi(ptrPort+1);
+ ((LPSOCKADDR_IN)lpAddress)->sin_port = htons(atoi(ptrPort+1));
*ptrPort = '\0';
}
else
@@ -5002,7 +5002,7 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
ptrPort = strchr(workBuffer, ']');
if(ptrPort && *(++ptrPort) == ':')
{
- ((LPSOCKADDR_IN6)lpAddress)->sin6_port = (WS_u_short)atoi(ptrPort+1);
+ ((LPSOCKADDR_IN6)lpAddress)->sin6_port = htons(atoi(ptrPort+1));
*ptrPort = '\0';
}
else
More information about the wine-cvs
mailing list