Cluster: abort loading nodes data if vars arguments are unbalanced.
See for reference PR #6337. Thanks to @git-hulk for spotting this.
This commit is contained in:
parent
3b40a88587
commit
4ff08c8657
@ -138,6 +138,7 @@ int clusterLoadConfig(char *filename) {
|
|||||||
/* Handle the special "vars" line. Don't pretend it is the last
|
/* Handle the special "vars" line. Don't pretend it is the last
|
||||||
* line even if it actually is when generated by Redis. */
|
* line even if it actually is when generated by Redis. */
|
||||||
if (strcasecmp(argv[0],"vars") == 0) {
|
if (strcasecmp(argv[0],"vars") == 0) {
|
||||||
|
if (!(argc % 2)) goto fmterr;
|
||||||
for (j = 1; j < argc; j += 2) {
|
for (j = 1; j < argc; j += 2) {
|
||||||
if (strcasecmp(argv[j],"currentEpoch") == 0) {
|
if (strcasecmp(argv[j],"currentEpoch") == 0) {
|
||||||
server.cluster->currentEpoch =
|
server.cluster->currentEpoch =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user