File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ PHP NEWS
3434 . Fix memory leaks when sk_X509_new_null() fails. (ndossche)
3535 . Fix crash when in openssl_x509_parse() when i2s_ASN1_INTEGER() fails.
3636 (ndossche)
37+ . Fix crash in openssl_x509_parse() when X509_NAME_oneline() fails.
38+ (ndossche)
3739
3840- Phar:
3941 . Fixed bug GH-20882 (buildFromIterator breaks with missing base directory).
Original file line number Diff line number Diff line change @@ -2134,6 +2134,11 @@ PHP_FUNCTION(openssl_x509_parse)
21342134
21352135 subject_name = X509_get_subject_name (cert );
21362136 cert_name = X509_NAME_oneline (subject_name , NULL , 0 );
2137+ if (cert_name == NULL ) {
2138+ php_openssl_store_errors ();
2139+ goto err ;
2140+ }
2141+
21372142 add_assoc_string (return_value , "name" , cert_name );
21382143 OPENSSL_free (cert_name );
21392144
You can’t perform that action at this time.
0 commit comments