From d5515331e24c02c802ed883f0be9d94154ff6b3d Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 16 Jun 2020 11:09:45 +0200 Subject: [PATCH] Tracking: fix enableBcastTrackingForPrefix() invalid sdslen() call. Related to #7387. (cherry picked from commit ae770c30349cb4c72393f3b70318371081f3cc65) --- src/tracking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracking.c b/src/tracking.c index eb4113131..8c2dca7ba 100644 --- a/src/tracking.c +++ b/src/tracking.c @@ -102,7 +102,7 @@ void disableTracking(client *c) { /* Set the client 'c' to track the prefix 'prefix'. If the client 'c' is * already registered for the specified prefix, no operation is performed. */ void enableBcastTrackingForPrefix(client *c, char *prefix, size_t plen) { - bcastState *bs = raxFind(PrefixTable,(unsigned char*)prefix,sdslen(prefix)); + bcastState *bs = raxFind(PrefixTable,(unsigned char*)prefix,plen); /* If this is the first client subscribing to such prefix, create * the prefix in the table. */ if (bs == raxNotFound) {