From 7321030f3e0b5041d719405d38d3572946e57add Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 11 Feb 2024 22:00:03 +0100 Subject: Fail if .makeenv has a line that starts with = MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- makeenv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/makeenv.c b/makeenv.c index f71bc00..2f88f2d 100644 --- a/makeenv.c +++ b/makeenv.c @@ -317,8 +317,12 @@ main(int argc, char *argv[]) put_options(line); } else if (has_equals) { trim_around_equals(line); - if (*line != '=' && *line != '#') + if (*line == '=') { + fprintf(stderr, "%s: empty variable name listed in .makeenv\n", argv0); + return 125; + } else if (*line != '#') { put_macro(line); + } } else { if (*line && *line != '#') put_targets(line); -- cgit v1.2.3-70-g09d2