diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 8dbae7aaa..6dabd3409 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1849,7 +1849,7 @@ int mbedtls_ssl_psk_derive_premaster( mbedtls_ssl_context *ssl, mbedtls_key_exch unsigned char *p = ssl->handshake->premaster; unsigned char *end = p + sizeof( ssl->handshake->premaster ); const unsigned char *psk; - size_t psk_len; + size_t psk_len = 0; if( mbedtls_ssl_get_psk( ssl, &psk, &psk_len ) == MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED )