From a3461cef0690dff3da3560b2d794b7dfd75babb3 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Fri, 30 May 2014 23:34:04 +0800 Subject: [PATCH] transport: add a null pointer check. --- libfreerdp/core/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index bb455a927..ffedf1b63 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -711,7 +711,7 @@ int transport_read_layer(rdpTransport* transport, BYTE* data, int bytes) if (status < 0) { - if (!BIO_should_retry(transport->frontBio)) + if (!transport->frontBio || !BIO_should_retry(transport->frontBio)) { /* something unexpected happened, let's close */ transport->layer = TRANSPORT_LAYER_CLOSED;