From b12ccc840e6959027715d8bbc6f6d372ea2fd18f Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 2 Sep 2019 11:41:16 +0200 Subject: [PATCH] Cluster: abort loading nodes data if vars arguments are unbalanced. See for reference PR #6337. Thanks to @git-hulk for spotting this. --- src/cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cluster.c b/src/cluster.c index e22222700..a2615fdc0 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 =