From f37134682ba2882cabc684cce772ef90a8adc90c Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 16 Nov 2016 14:13:13 +0100 Subject: [PATCH] Cluster: handle zero bytes at the end of nodes.conf. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 9289f6782..bedf5f81e 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -129,7 +129,7 @@ int clusterLoadConfig(char *filename) { /* Skip blank lines, they can be created either by users manually * editing nodes.conf or by the config writing process if stopped * before the truncate() call. */ - if (line[0] == '\n') continue; + if (line[0] == '\n' || line[0] == '\0') continue; /* Split the line into arguments for processing. */ argv = sdssplitargs(line,&argc);