From 5bd46d33db53186fddefbe2be8ab8a2805a66612 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 11 Jul 2017 12:44:56 +0200 Subject: [PATCH] Fix isHLLObjectOrReply() to handle integer encoded strings. Close #3766. --- src/hyperloglog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hyperloglog.c b/src/hyperloglog.c index 49516f82..f4b5bd1c 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;