diff options
author | John Sully <john@csquare.ca> | 2019-07-29 18:11:52 -0400 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-07-30 10:28:17 +0200 |
commit | 6ef5a0cbbb464ef4f113153f47a7fc6950a6ce77 (patch) | |
tree | 3357af638880f4b1adb75a457b3f61c5f1f2b75d /src/hyperloglog.c | |
parent | 990cd2c8357f2fa6629f55b75f88e76873ab8c97 (diff) | |
download | redis-6ef5a0cbbb464ef4f113153f47a7fc6950a6ce77.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 293e73940..e807e246f 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -689,6 +689,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) { 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; |