From: Lennart Poettering Date: Fri, 2 Sep 2022 09:33:48 +0000 (+0200) Subject: bootspec: complain about loader.conf lines without parameter X-Git-Tag: v252-rc1~268^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ac2a89a8f02df9ea26df56891973172cf712d65;p=thirdparty%2Fsystemd.git bootspec: complain about loader.conf lines without parameter --- diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index ebb172404b3..3ca65454c1a 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -369,6 +369,10 @@ int boot_loader_read_conf(BootConfig *config, FILE *file, const char *path) { log_syntax(NULL, LOG_WARNING, path, line, 0, "Bad syntax, ignoring line."); continue; } + if (isempty(p)) { + log_syntax(NULL, LOG_WARNING, path, line, 0, "Field '%s' without value, ignoring line.", field); + continue; + } if (streq(field, "default")) r = free_and_strdup(&config->default_pattern, p);