diff options
-rw-r--r-- | src/core/stdssl/src/netlibssl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/stdssl/src/netlibssl.cpp b/src/core/stdssl/src/netlibssl.cpp index 5a61752fd6..8781e4ea20 100644 --- a/src/core/stdssl/src/netlibssl.cpp +++ b/src/core/stdssl/src/netlibssl.cpp @@ -763,6 +763,13 @@ static void* NetlibSslUnique(SslHandle *ssl, int *cbLen) return nullptr;
LPBYTE pBuf = LPBYTE(bindings.dwInitiatorOffset);
+ if (bindings.dwInitiatorOffset == 0) {
+ char tmp[sizeof(bindings)*2 + 1];
+ bin2hex(&bindings, sizeof(bindings), tmp);
+ Netlib_Logf(nullptr, "Failed bindings: %s", tmp);
+ return nullptr;
+ }
+
bindings = *(SEC_CHANNEL_BINDINGS *)bindings.dwInitiatorOffset;
pBuf += bindings.dwApplicationDataOffset;
if (memcmp(pBuf, "tls-unique:", 11))
|