mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Repair a regression in OpenSSL 0.9.7d: processing an unsigned PKCS#7
object could cause a null pointer dereference. Obtained from: OpenSSL CVS (change number 12080) MFC After: 1 day Reported by: Daniel Lang <dl@leo.org>
This commit is contained in:
parent
ced566fd0b
commit
fe2b6e6689
1 changed files with 9 additions and 4 deletions
|
|
@ -257,10 +257,15 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
|
|||
bio=BIO_new(BIO_s_null());
|
||||
else
|
||||
{
|
||||
ASN1_OCTET_STRING *os;
|
||||
os = PKCS7_get_octet_string(p7->d.sign->contents);
|
||||
if (os && os->length > 0)
|
||||
bio = BIO_new_mem_buf(os->data, os->length);
|
||||
if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
ASN1_OCTET_STRING *os;
|
||||
os = PKCS7_get_octet_string(
|
||||
p7->d.sign->contents);
|
||||
if (os && os->length > 0)
|
||||
bio = BIO_new_mem_buf(os->data,
|
||||
os->length);
|
||||
}
|
||||
if(bio == NULL)
|
||||
{
|
||||
bio=BIO_new(BIO_s_mem());
|
||||
|
|
|
|||
Loading…
Reference in a new issue