mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Fixed#1895
This commit is contained in:
committed by
michael-grunder
parent
d2c927ba85
commit
87297cbb40
@@ -721,7 +721,11 @@ static zend_string *redis_hash_auth(zend_string *user, zend_string *pass) {
|
||||
smart_str_appendl_ex(&salted, REDIS_G(salt), sizeof(REDIS_G(salt)), 0);
|
||||
|
||||
ctx = emalloc(ops->context_size);
|
||||
#if PHP_VERSION_ID >= 80100
|
||||
ops->hash_init(ctx,NULL);
|
||||
#else
|
||||
ops->hash_init(ctx);
|
||||
#endif
|
||||
ops->hash_update(ctx, (const unsigned char *)ZSTR_VAL(salted.s), ZSTR_LEN(salted.s));
|
||||
|
||||
digest = emalloc(ops->digest_size);
|
||||
|
||||
@@ -494,7 +494,11 @@ ra_find_node(RedisArray *ra, const char *key, int key_len, int *out_pos)
|
||||
void *ctx = emalloc(ops->context_size);
|
||||
unsigned char *digest = emalloc(ops->digest_size);
|
||||
|
||||
#if PHP_VERSION_ID >= 80100
|
||||
ops->hash_init(ctx,NULL);
|
||||
#else
|
||||
ops->hash_init(ctx);
|
||||
#endif
|
||||
ops->hash_update(ctx, (const unsigned char *)ZSTR_VAL(out), ZSTR_LEN(out));
|
||||
ops->hash_final(digest, ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user