On Wed, Jul 06, 2011 at 10:34:45AM +0200, Frédéric Delanoy wrote:
dlls/ws2_32/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 4fc65ab..91aab01 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5874,7 +5874,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen, { case CF_ACCEPT: if (addr && addrlen)
addr = memcpy(addr, &src_addr, (*addrlen > size) ? size : *addrlen );
memcpy(addr, &src_addr, (*addrlen > size) ? size : *addrlen );
This is wrong. Keep the addrlen check.
Ciao, Marcus
On Wed, Jul 06, 2011 at 10:57:12AM +0200, Marcus Meissner wrote:
On Wed, Jul 06, 2011 at 10:34:45AM +0200, Frédéric Delanoy wrote:
dlls/ws2_32/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 4fc65ab..91aab01 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5874,7 +5874,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen, { case CF_ACCEPT: if (addr && addrlen)
addr = memcpy(addr, &src_addr, (*addrlen > size) ? size : *addrlen );
memcpy(addr, &src_addr, (*addrlen > size) ? size : *addrlen );
This is wrong. Keep the addrlen check.
Sorry, was mistaken... I thought you removed the if().
Ciao, Marcus