diff options
author | John Sully <john@csquare.ca> | 2019-07-29 18:11:52 -0400 |
---|---|---|
committer | John Sully <john@csquare.ca> | 2019-07-29 18:11:52 -0400 |
commit | d659654f53c276a5a96e8559793ffdb9051957fd (patch) | |
tree | f33243d8eb60a9834f2dadd94724a17bd2a1a978 /src/hyperloglog.c | |
parent | 505a855000ef8f1fbea9cb41841fa8708175bba4 (diff) | |
download | redis-d659654f53c276a5a96e8559793ffdb9051957fd.tar.gz |
Fix HLL corruption bug
Diffstat (limited to 'src/hyperloglog.c')
-rw-r--r-- | src/hyperloglog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c index e01ea6042..e0557f985 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -701,6 +701,7 @@ int hllSparseSet(robj *o, long index, uint8_t count) { first += span; } if (span == 0) return -1; /* Invalid format. */ + if (span >= end) return -1; /* Invalid format. */ next = HLL_SPARSE_IS_XZERO(p) ? p+2 : p+1; if (next >= end) next = NULL; |