summaryrefslogtreecommitdiff
path: root/src/hyperloglog.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-07-30 15:14:08 +0300
committerOran Agra <oran@redislabs.com>2019-07-30 15:14:08 +0300
commite5187ad2aeb9b2d438af0b728b9de4e8e2cc8f33 (patch)
tree20b51660de8def2533911139ca63ca46c48e317e /src/hyperloglog.c
parent4339706e07e15fe5a228d175756c4e4be83e2867 (diff)
parentf42846e8c7127c8e84b6938a6bd73e2363b4a90c (diff)
downloadredis-e5187ad2aeb9b2d438af0b728b9de4e8e2cc8f33.tar.gz
Merge remote-tracking branch 'oss/unstable' into module_rdb_load_errors
Diffstat (limited to 'src/hyperloglog.c')
-rw-r--r--src/hyperloglog.c1
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;