mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add missing error check on PEM_write_bio_PKCS7()
Closes GH-10752.
This commit is contained in:
parent
51ea4a680d
commit
22c9e7e27e
2 changed files with 8 additions and 1 deletions
3
NEWS
3
NEWS
|
@ -12,6 +12,9 @@ PHP NEWS
|
|||
- Opcache:
|
||||
. Fixed build for macOS to cater with pkg-config settings. (David Carlier)
|
||||
|
||||
- OpenSSL:
|
||||
. Add missing error checks on file writing functions. (nielsdos)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug GH-10766 (PharData archive created with Phar::Zip format does
|
||||
not keep files metadata (datetime)). (nielsdos)
|
||||
|
|
|
@ -5406,7 +5406,11 @@ PHP_FUNCTION(openssl_pkcs7_verify)
|
|||
}
|
||||
|
||||
if (p7bout) {
|
||||
PEM_write_bio_PKCS7(p7bout, p7);
|
||||
if (PEM_write_bio_PKCS7(p7bout, p7) == 0) {
|
||||
php_error_docref(NULL, E_WARNING, "Failed to write PKCS7 to file");
|
||||
php_openssl_store_errors();
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue