We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef54bec commit 556ec77Copy full SHA for 556ec77
1 file changed
ext/openssl/openssl.c
@@ -5849,7 +5849,10 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
5849
goto clean_exit;
5850
}
5851
5852
- sk_X509_push(recipcerts, cert);
+ if (sk_X509_push(recipcerts, cert) <= 0) {
5853
+ X509_free(cert);
5854
+ goto clean_exit;
5855
+ }
5856
} ZEND_HASH_FOREACH_END();
5857
} else {
5858
/* a single certificate */
@@ -5870,7 +5873,10 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
5870
5873
5871
5874
5872
5875
5876
5877
5878
5879
5880
5881
5882
/* sanity check the cipher */
0 commit comments