Skip to content

Commit 4276d66

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 3b2f2ce + 69a7713 commit 4276d66

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ext/openssl/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7012,7 +7012,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
70127012
zend_long buffer_length;
70137013
zval *zstrong_result_returned = NULL;
70147014

7015-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z/", &buffer_length, &zstrong_result_returned) == FAILURE) {
7015+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z", &buffer_length, &zstrong_result_returned) == FAILURE) {
70167016
return;
70177017
}
70187018

ext/openssl/tests/bug78391.phpt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
Bug #78391: Assertion failure in openssl_random_pseudo_bytes
3+
--FILE--
4+
<?php
5+
6+
$isStrongCrypto = false;
7+
var_dump(strlen(openssl_random_pseudo_bytes(16, $isStrongCrypto)));
8+
var_dump($isStrongCrypto);
9+
10+
?>
11+
--EXPECT--
12+
int(16)
13+
bool(true)

0 commit comments

Comments
 (0)