summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-10 22:18:01 +0200
committerGitHub <noreply@github.com>2019-06-10 22:18:01 +0200
commit629bc10d80414570d18e0d918e59a116cb68dced (patch)
treeb50108f029634b57afefded7aa103759c6e8da8a /core
parentee86b18a5e4fecbb50960652da4b8e2e20912226 (diff)
parent64626f682e41168a2973c5f23f35f5518c211864 (diff)
Merge pull request #29546 from hpvb/fix-random-ssl-crash
Fix random ssl crash
Diffstat (limited to 'core')
-rw-r--r--core/io/http_client.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index ce2054db36..891fb7b0ca 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -346,6 +346,12 @@ Error HTTPClient::poll() {
} else {
// We are already handshaking, which means we can use your already active SSL connection
ssl = static_cast<Ref<StreamPeerSSL> >(connection);
+ if (ssl.is_null()) {
+ close();
+ status = STATUS_SSL_HANDSHAKE_ERROR;
+ return ERR_CANT_CONNECT;
+ }
+
ssl->poll(); // Try to finish the handshake
}