Skip to content

Commit 85589ca

Browse files
committed
Add php_openssl_store_errors to bailouts
1 parent d2f07ed commit 85589ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/openssl/openssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,13 +2311,15 @@ PHP_FUNCTION(openssl_x509_parse)
23112311
bn_serial = ASN1_INTEGER_to_BN(asn1_serial, NULL);
23122312
/* Can return NULL on error or memory allocation failure */
23132313
if (!bn_serial) {
2314+
php_openssl_store_errors();
23142315
RETURN_FALSE;
23152316
}
23162317

23172318
hex_serial = BN_bn2hex(bn_serial);
23182319
BN_free(bn_serial);
23192320
/* Can return NULL on error or memory allocation failure */
23202321
if (!hex_serial) {
2322+
php_openssl_store_errors();
23212323
RETURN_FALSE;
23222324
}
23232325

0 commit comments

Comments
 (0)