We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just testing the current code on hpux before testing the opensslv3 updates and noticed that after #51 is fixed we have an out of memory issue.
It appears the the call to BIO_get_mem_ptr result in an invalid length in bptr->length or maybe the data there is just incorrect.
The following fixes the issue but I am awaiting some feedback from the openssl people to see if there is any reason not to make this the default...
diff --git a/RSA.xs b/RSA.xs index 5f5cfae..b6c0509 100644 --- a/RSA.xs +++ b/RSA.xs @@ -165,11 +165,13 @@ SV* cor_bn2sv(const BIGNUM* p_bn)
SV* extractBioString(BIO* p_stringBio) { SV* sv; - BUF_MEM* bptr; + char *datap; + long datasize = 0; CHECK_OPEN_SSL(BIO_flush(p_stringBio) == 1); - BIO_get_mem_ptr(p_stringBio, &bptr); - sv = newSVpv(bptr->data, bptr->length); + + datasize = BIO_get_mem_data(p_stringBio, &datap); + sv = newSVpv(datap, datasize); CHECK_OPEN_SSL(BIO_set_close(p_stringBio, BIO_CLOSE) == 1); BIO_free(p_stringBio);
The text was updated successfully, but these errors were encountered:
As per openssl/openssl#24791 the recommend approach is to move to BIO_get_mem_data instead of accessing the structures directly. I will submit a patch
Sorry, something went wrong.
Fixes toddr#52 - Out of memory on openssl 1.1.1w hpux
2d041e9
a441b56
No branches or pull requests
Just testing the current code on hpux before testing the opensslv3 updates and noticed that after #51 is fixed we have an out of memory issue.
It appears the the call to BIO_get_mem_ptr result in an invalid length in bptr->length or maybe the data there is just incorrect.
The following fixes the issue but I am awaiting some feedback from the openssl people to see if there is any reason not to make this the default...
diff --git a/RSA.xs b/RSA.xs
index 5f5cfae..b6c0509 100644
--- a/RSA.xs
+++ b/RSA.xs
@@ -165,11 +165,13 @@ SV* cor_bn2sv(const BIGNUM* p_bn)
The text was updated successfully, but these errors were encountered: