1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Properly initialise psk and psk_len

Signed-off-by: Guilhem Bryant <Guilhem.Bryant@arm.com>
This commit is contained in:
Guilhem Bryant
2020-04-01 11:23:58 +01:00
parent 8a69ddd7ad
commit b5f04e4d84
2 changed files with 3 additions and 1 deletions

View File

@ -1848,7 +1848,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;
const unsigned char *psk = NULL;
size_t psk_len = 0;
if( mbedtls_ssl_get_psk( ssl, &psk, &psk_len )