diff --git a/src/tools.c b/src/tools.c index 06b8b2018..fbb4c4781 100644 --- a/src/tools.c +++ b/src/tools.c @@ -6507,6 +6507,10 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg *nbargs = arg; *outlen = outpos; + /* make sure empty lines are terminated */ + if (!arg) + EMIT_CHAR(0); + /* empty all trailing args by making them point to the trailing zero, * at least the last one in any case. */