diff options
author | antirez <antirez@gmail.com> | 2019-09-02 11:41:16 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-09-25 11:50:30 +0200 |
commit | 2810de9fc1b77c7cba34c822e8847a0dbf4841d6 (patch) | |
tree | a865e8b0f48113a02634e0eda58fd3b50712fc04 | |
parent | f5c63ce0aec812f064a52ccbb071dd4aed769d58 (diff) | |
download | redis-2810de9fc1b77c7cba34c822e8847a0dbf4841d6.tar.gz |
Cluster: abort loading nodes data if vars arguments are unbalanced.
See for reference PR #6337. Thanks to @git-hulk for spotting this.
-rw-r--r-- | src/cluster.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.c b/src/cluster.c index 3ea5b91d5..858c0c9b6 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -138,6 +138,7 @@ int clusterLoadConfig(char *filename) { /* Handle the special "vars" line. Don't pretend it is the last * line even if it actually is when generated by Redis. */ if (strcasecmp(argv[0],"vars") == 0) { + if (!(argc % 2)) goto fmterr; for (j = 1; j < argc; j += 2) { if (strcasecmp(argv[j],"currentEpoch") == 0) { server.cluster->currentEpoch = |