mirror of https://mirror.osredm.com/root/redis.git
Fix rank overflow in zslInsert with more than 2B entries. (#9249)
If there are more than 2B entries in a zset. The calculated span will overflow.
This commit is contained in:
parent
ee4bdf10ee
commit
e7ccdeebc9
|
@ -131,7 +131,7 @@ int zslRandomLevel(void) {
|
|||
* of the passed SDS string 'ele'. */
|
||||
zskiplistNode *zslInsert(zskiplist *zsl, double score, sds ele) {
|
||||
zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
|
||||
unsigned int rank[ZSKIPLIST_MAXLEVEL];
|
||||
unsigned long rank[ZSKIPLIST_MAXLEVEL];
|
||||
int i, level;
|
||||
|
||||
serverAssert(!isnan(score));
|
||||
|
|
Loading…
Reference in New Issue