projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf43406
)
Fixed #4993: Allow uninitialized bio socket in transport_bio_simple_uninit
author
Armin Novak
<armin.novak@thincast.com>
Wed, 7 Nov 2018 16:01:28 +0000
(17:01 +0100)
committer
Armin Novak
<armin.novak@thincast.com>
Wed, 7 Nov 2018 16:02:07 +0000
(17:02 +0100)
When the TLS connection is aborted early (certificate issues, ...)
the bio simple socket might not have been initialized.
Do not access the NULL pointer on cleanup.
libfreerdp/core/tcp.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/tcp.c
b/libfreerdp/core/tcp.c
index
69c9c26
..
e25c543
100644
(file)
--- a/
libfreerdp/core/tcp.c
+++ b/
libfreerdp/core/tcp.c
@@
-380,7
+380,7
@@
static int transport_bio_simple_uninit(BIO* bio)
if (BIO_get_shutdown(bio))
{
- if (BIO_get_init(bio))
+ if (BIO_get_init(bio)
&& ptr
)
{
_shutdown(ptr->socket, SD_BOTH);
closesocket(ptr->socket);
@@
-388,7
+388,7
@@
static int transport_bio_simple_uninit(BIO* bio)
}
}
- if (ptr->hEvent)
+ if (ptr
&& ptr
->hEvent)
{
CloseHandle(ptr->hEvent);
ptr->hEvent = NULL;