Marcus Meissner : ws2_32: handle error return from get_sock_fd (Coverity).
Module: wine Branch: master Commit: 54dc91547d79f0b76a11672f41648e81f331efcc URL: http://source.winehq.org/git/wine.git/?a=commit;h=54dc91547d79f0b76a11672f41... Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jan 4 17:49:40 2014 +0100 ws2_32: handle error return from get_sock_fd (Coverity). --- dlls/ws2_32/socket.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index b027d7a..a855285 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1178,6 +1178,8 @@ static int set_ipx_packettype(int sock, int ptype) int fd = get_sock_fd( sock, 0, NULL ), ret = 0; TRACE("trying to set IPX_PTYPE: %d (fd: %d)\n", ptype, fd); + if (fd == -1) return SOCKET_ERROR; + /* We try to set the ipx type on ipx socket level. */ #ifdef SOL_IPX if(setsockopt(fd, SOL_IPX, IPX_TYPE, &ptype, sizeof(ptype)) == -1)
participants (1)
-
Alexandre Julliard