Skip to content

Commit

Permalink
Cluster: abort loading nodes data if vars arguments are unbalanced.
Browse files Browse the repository at this point in the history
See for reference PR #6337. Thanks to @git-hulk for spotting this.
  • Loading branch information
antirez committed Sep 25, 2019
1 parent f5c63ce commit 2810de9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster.c
Expand Up @@ -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 =
Expand Down

0 comments on commit 2810de9

Please sign in to comment.