Merge branch 'PHP-7.4'

This commit is contained in:
Nikita Popov 2019-08-09 15:02:57 +02:00
commit 4276d669d2
2 changed files with 14 additions and 1 deletions

View File

@ -7012,7 +7012,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
zend_long buffer_length; zend_long buffer_length;
zval *zstrong_result_returned = NULL; 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; return;
} }

View File

@ -0,0 +1,13 @@
--TEST--
Bug #78391: Assertion failure in openssl_random_pseudo_bytes
--FILE--
<?php
$isStrongCrypto = false;
var_dump(strlen(openssl_random_pseudo_bytes(16, $isStrongCrypto)));
var_dump($isStrongCrypto);
?>
--EXPECT--
int(16)
bool(true)