From 31ffb498f86f147948e105aa49f10686265c8685 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 14 Nov 2013 10:09:21 +0100 Subject: [PATCH 1/2] Fixed argument checks in --- libfreerdp/core/transport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index f47cf4b59..1164caf5d 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -74,6 +74,9 @@ BOOL transport_disconnect(rdpTransport* transport) { BOOL status = TRUE; + if (!transport) + return FALSE; + if (transport->layer == TRANSPORT_LAYER_TLS) status &= tls_disconnect(transport->TlsIn); From 6f43252c9a8a207346c8fa6099fa72d1a5bf1665 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 14 Nov 2013 10:09:40 +0100 Subject: [PATCH 2/2] Fixed argument check in --- libfreerdp/crypto/tls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 1b5c92ab8..3b97486b5 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -360,6 +360,9 @@ BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file) BOOL tls_disconnect(rdpTls* tls) { + if (!tls) + return FALSE; + if (tls->ssl) SSL_shutdown(tls->ssl);