HyperLogLog: fix the fix of a corruption bug.
This commit is contained in:
parent
f42846e8c7
commit
b2079cb508
@ -700,8 +700,7 @@ int hllSparseSet(robj *o, long index, uint8_t count) {
|
|||||||
p += oplen;
|
p += oplen;
|
||||||
first += span;
|
first += span;
|
||||||
}
|
}
|
||||||
if (span == 0) return -1; /* Invalid format. */
|
if (span == 0 || p >= end) return -1; /* Invalid format. */
|
||||||
if (span >= end) return -1; /* Invalid format. */
|
|
||||||
|
|
||||||
next = HLL_SPARSE_IS_XZERO(p) ? p+2 : p+1;
|
next = HLL_SPARSE_IS_XZERO(p) ? p+2 : p+1;
|
||||||
if (next >= end) next = NULL;
|
if (next >= end) next = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user