Skip to content

Commit e8c9c73

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix hash_pbkdf2 options parameter
2 parents 796a75f + 7cae6eb commit e8c9c73

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.10
44

5+
- Hash:
6+
. Fix use-of-uninitialized-value in hash_pbkdf2(), fix missing $options
7+
parameter in signature. (ilutov)
58

69
03 Aug 2023, PHP 8.2.9
710

ext/hash/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ PHP_FUNCTION(hash_pbkdf2)
993993
bool raw_output = 0;
994994
const php_hash_ops *ops;
995995
void *context;
996-
HashTable *args;
996+
HashTable *args = NULL;
997997

998998
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|lbh", &algo, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output, &args) == FAILURE) {
999999
RETURN_THROWS();

ext/hash/hash.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function hash_hmac_algos(): array {}
5858
/**
5959
* @refcount 1
6060
*/
61-
function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {}
61+
function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iterations, int $length = 0, bool $binary = false, array $options = []): string {}
6262

6363
function hash_equals(#[\SensitiveParameter] string $known_string, #[\SensitiveParameter] string $user_string): bool {}
6464

ext/hash/hash_arginfo.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)