mirror of https://github.com/ARMmbed/mbed-os.git
Change storage-class of secret_buf to static
Storing the address of a local variable (`secret_buf`) in non-local memory (`prf_ptr->secret`) can cause a dangling pointer bug if the address is used after the function returns.pull/15405/head
parent
d0ca14e4fe
commit
1b77cda621
|
@ -2095,7 +2095,7 @@ void tls_master_key_cal(tls_heap_t *heap_ptr, sec_suite_t *tls_suite)
|
|||
{
|
||||
uint8_t *ptr;
|
||||
prf_sec_param_t *prf_ptr = shalib_prf_param_get();
|
||||
uint8_t secret_buf[2 + 16 + 2 + 16];
|
||||
static uint8_t secret_buf[2 + 16 + 2 + 16];
|
||||
tr_debug("CAL Master secret:");
|
||||
//Her have to to be set check is
|
||||
#ifdef ECC
|
||||
|
|
Loading…
Reference in New Issue