Prevent dangling pointer in TLSX_Cookie_Use
ZD 11603
This commit is contained in:
parent
311a0d25dd
commit
3da6b8364e
@ -6374,6 +6374,9 @@ int TLSX_Cookie_Use(WOLFSSL* ssl, byte* data, word16 len, byte* mac,
|
||||
if (mac != NULL)
|
||||
XMEMCPY(&cookie->data + len, mac, macSz);
|
||||
|
||||
if (extension->data != NULL)
|
||||
XFREE(extension->data, ssl->heap, DYNAMIC_TYPE_TLSX);
|
||||
|
||||
extension->data = (void*)cookie;
|
||||
extension->resp = (byte)resp;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user