mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 11:44:38 +02:00
Prevent dangling pointer in TLSX_Cookie_Use
ZD 11603
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user