From 21661d7acc9ed525c1150f6fa55646d19f5a31d9 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 24 Apr 2012 11:28:10 +0200 Subject: [PATCH] Fixed a bug in propagation of PUBLISH via the cluster bus. This bug was spotted by clang on FreeBSD. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 07552c18..e87ca45a 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -902,7 +902,7 @@ void clusterSendPublish(clusterLink *link, robj *channel, robj *message) { } else { payload = zmalloc(totlen); hdr = (clusterMsg*) payload; - memcpy(payload,hdr,sizeof(hdr)); + memcpy(payload,hdr,sizeof(*hdr)); } memcpy(hdr->data.publish.msg.bulk_data,channel->ptr,sdslen(channel->ptr)); memcpy(hdr->data.publish.msg.bulk_data+sdslen(channel->ptr), -- 2.49.0