Marcus Meissner : ws2_32: Check namelen before dereferencing it in TRACE ( Coverity).
Alexandre Julliard
julliard at winehq.org
Thu Feb 4 11:11:04 CST 2010
Module: wine
Branch: master
Commit: d28125219692e14558dbfe6938bb25043c850cc4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d28125219692e14558dbfe6938bb25043c850cc4
Author: Marcus Meissner <meissner at suse.de>
Date: Thu Feb 4 15:07:30 2010 +0100
ws2_32: Check namelen before dereferencing it in TRACE (Coverity).
---
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 a9e9538..c66c853 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -1795,7 +1795,7 @@ int WINAPI WS_getpeername(SOCKET s, struct WS_sockaddr *name, int *namelen)
int fd;
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 );
res = SOCKET_ERROR;
More information about the wine-cvs
mailing list