mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
openssl: Fix potential crash with ECDH on Windows
Apparently, we should use OPENSSL_free() to release memory allocated by OpenSSL. While it generally maps to free() that's apparently not the case on Windows, where the ECP test vectors caused `ACCESS_VIOLATION exception` crashes (not always the same vector). Fixes: 74e02ff5e624 ("openssl: Mainly use EVP interface for ECDH")
This commit is contained in:
parent
55df5e9797
commit
6c26267b07
@ -246,7 +246,7 @@ METHOD(diffie_hellman_t, get_my_public_value, bool,
|
||||
if (pub.len != 0)
|
||||
{
|
||||
*value = chunk_clone(chunk_skip(pub, 1));
|
||||
chunk_free(&pub);
|
||||
OPENSSL_free(pub.ptr);
|
||||
return value->len != 0;
|
||||
}
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user