summaryrefslogtreecommitdiff
path: root/src/hyperloglog.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-07-11 12:44:56 +0200
committerantirez <antirez@gmail.com>2017-07-11 12:44:59 +0200
commit5bd46d33db53186fddefbe2be8ab8a2805a66612 (patch)
tree97d3b7d20cf71b8e3f736704be88196b61b6dd47 /src/hyperloglog.c
parente203a46cf3b9237a59ea10ddfd9e2578d110a5fe (diff)
downloadredis-5bd46d33db53186fddefbe2be8ab8a2805a66612.tar.gz
Fix isHLLObjectOrReply() to handle integer encoded strings.
Close #3766.
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 49516f824..f4b5bd1c1 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -1121,6 +1121,7 @@ int isHLLObjectOrReply(client *c, robj *o) {
if (checkType(c,o,OBJ_STRING))
return C_ERR; /* Error already sent. */
+ if (!sdsEncodedObject(o)) goto invalid;
if (stringObjectLen(o) < sizeof(*hdr)) goto invalid;
hdr = o->ptr;