Skip to content

Commit 791ca5d

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix hash_pbkdf2 options parameter
2 parents 7236dfe + e8c9c73 commit 791ca5d

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ PHP NEWS
4242
. Added warning to log when fpm socket was not registered on the expected
4343
path. (Joshua Behrens, Jakub Zelenka)
4444

45+
- Hash:
46+
. Fix use-of-uninitialized-value in hash_pbkdf2(), fix missing $options
47+
parameter in signature. (ilutov)
48+
4549
- Intl:
4650
. Fix memory leak in MessageFormatter::format() on failure. (Girgias)
4751

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
@@ -60,7 +60,7 @@ function hash_hmac_algos(): array {}
6060
/**
6161
* @refcount 1
6262
*/
63-
function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {}
63+
function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iterations, int $length = 0, bool $binary = false, array $options = []): string {}
6464

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

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)