From 449929fc356e07f66675e0fc987eb6a6501221c3 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 15 Apr 2015 10:37:28 +0200 Subject: [PATCH 1/2] Fixed NULL dereference. --- channels/cliprdr/server/cliprdr_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index f0f4bebb5..dd8db3813 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -629,11 +629,11 @@ static int cliprdr_server_receive_format_list(CliprdrServerContext* context, wSt for (index = 0; index < formatList.numFormats; index++) { - if (formats[index].formatName) - free(formats[index].formatName); + if (formatList.formats[index].formatName) + free(formatList.formats[index].formatName); } - free(formats); + free(formatList.formats); return 1; } From 5525d9f88b1555b300dbcf488b90a22f4e4a8e1d Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 15 Apr 2015 10:38:04 +0200 Subject: [PATCH 2/2] Fixed uninitialized return value. --- libfreerdp/core/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 5c94049c8..b357bc5f5 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -842,7 +842,7 @@ int freerdp_tcp_connect_multi(char** hostnames, int count, int port, int timeout int flags; int maxfds; fd_set cfds; - int sockfd; + int sockfd = -1; int* sockfds; char port_str[16]; socklen_t optlen;