Commit d2812521 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

ws2_32: Check namelen before dereferencing it in TRACE (Coverity).

parent 4c7b8ca5
...@@ -1795,7 +1795,7 @@ int WINAPI WS_getpeername(SOCKET s, struct WS_sockaddr *name, int *namelen) ...@@ -1795,7 +1795,7 @@ int WINAPI WS_getpeername(SOCKET s, struct WS_sockaddr *name, int *namelen)
int fd; int fd;
int res; int res;
TRACE("socket: %04lx, ptr %p, len %08x\n", s, name, *namelen); TRACE("socket: %04lx, ptr %p, len %08x\n", s, name, namelen?*namelen:0);
fd = get_sock_fd( s, 0, NULL ); fd = get_sock_fd( s, 0, NULL );
res = SOCKET_ERROR; res = SOCKET_ERROR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment