} 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),