summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli.c b/src/cli.c
index c1fdcf6c..abb6bf3c 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -61,6 +61,10 @@ static char *cli_append_multiline(char *line)
}
len = strlen(line);
+
+ if (len == 0)
+ return NULL;
+
if (line[len - 1] == '\\') {
line[len - 1] = '\0';
len--;