summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-20 10:47:44 +0100
committerGitHub <noreply@github.com>2019-02-20 10:47:44 +0100
commit7376cbdc94f2c00f006b153e33349fe605e2112a (patch)
tree6c08744f3c8f15f998aac44d04c351090ddd1933 /modules
parent558c7d22fa3239ac8347184712dc568a6cb15712 (diff)
parent2b8b738391ed34b371673e4b62c7bd22e3503e2a (diff)
Merge pull request #26072 from Faless/net/mbedtls_1.16
Update mbedtls to 2.16.0 (LTS release) + ubsan hack
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/mbedtls/stream_peer_mbed_tls.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/mbedtls/stream_peer_mbed_tls.cpp b/modules/mbedtls/stream_peer_mbed_tls.cpp
index e4050b1af8..45d3b86919 100755
--- a/modules/mbedtls/stream_peer_mbed_tls.cpp
+++ b/modules/mbedtls/stream_peer_mbed_tls.cpp
@@ -270,7 +270,10 @@ void StreamPeerMbedTLS::poll() {
return;
}
- int ret = mbedtls_ssl_read(&ssl, NULL, 0);
+ // We could pass NULL as second parameter, but some behaviour sanitizers doesn't seem to like that.
+ // Passing a 1 byte buffer to workaround it.
+ uint8_t byte;
+ int ret = mbedtls_ssl_read(&ssl, &byte, 0);
if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
// Nothing to read/write (non blocking IO)