fix a bufferoverflow bug
This commit is contained in:
parent
0f03312c23
commit
0298d3ad18
@ -2268,7 +2268,7 @@ static clusterManagerNode *clusterManagerNewNode(char *ip, int port) {
|
||||
static sds clusterManagerGetNodeRDBFilename(clusterManagerNode *node) {
|
||||
assert(config.cluster_manager_command.backup_dir);
|
||||
sds filename = sdsnew(config.cluster_manager_command.backup_dir);
|
||||
if (filename[sdslen(filename)] - 1 != '/')
|
||||
if (filename[sdslen(filename) - 1] != '/')
|
||||
filename = sdscat(filename, "/");
|
||||
filename = sdscatprintf(filename, "redis-node-%s-%d-%s.rdb", node->ip,
|
||||
node->port, node->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user