mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Adjust coding style & fix test failures.
I am still not 100% convinced that there is no memory leak hidden somwehere... This also makes everything compile with OpenSSL 1.0.2 for me.
This commit is contained in:
parent
ea4cf7dbe9
commit
6a93abea32
4 changed files with 53 additions and 44 deletions
|
@ -240,10 +240,13 @@ void file_analysis::X509Common::ParseExtension(X509_EXTENSION* ex, EventHandlerP
|
|||
BIO *bio = BIO_new(BIO_s_mem());
|
||||
if( ! X509V3_EXT_print(bio, ex, 0, 0))
|
||||
{
|
||||
unsigned char **buf = NULL;
|
||||
int len = i2d_ASN1_OCTET_STRING(X509_EXTENSION_get_data(ex), buf);
|
||||
if (len >=0 )
|
||||
BIO_write(bio, *buf, len);
|
||||
unsigned char *buf = nullptr;
|
||||
int len = i2d_ASN1_OCTET_STRING(X509_EXTENSION_get_data(ex), &buf);
|
||||
if ( len >=0 )
|
||||
{
|
||||
BIO_write(bio, &buf, len);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
}
|
||||
|
||||
StringVal* ext_val = GetExtensionFromBIO(bio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue