From: Nikita Popov Date: Fri, 9 Aug 2019 13:02:06 +0000 (+0200) Subject: Fixed bug #78391 X-Git-Tag: php-7.4.0beta4~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=699b465da20fcb25747b3e1bad2e9f84a9d6d8b0;p=php Fixed bug #78391 --- diff --git a/NEWS b/NEWS index 21c109430f..ff22389e0e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #78383 (Casting a DateTime to array no longer returns its properties). (Nikita) +- OpenSSL: + . Fixed bug #78391 (Assertion failure in openssl_random_pseudo_bytes). + (Nikita) + 08 Aug 2019, PHP 7.4.0beta2 - Core: diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index b8acb79f6c..f566d4e6ed 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6974,7 +6974,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) zend_long buffer_length; zval *zstrong_result_returned = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z/", &buffer_length, &zstrong_result_returned) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z", &buffer_length, &zstrong_result_returned) == FAILURE) { return; } diff --git a/ext/openssl/tests/bug78391.phpt b/ext/openssl/tests/bug78391.phpt new file mode 100644 index 0000000000..936ef262b2 --- /dev/null +++ b/ext/openssl/tests/bug78391.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #78391: Assertion failure in openssl_random_pseudo_bytes +--FILE-- + +--EXPECT-- +int(16) +bool(true)