Before, we would let through a line like "moduledir \n".
Signed-off-by: Keegan McAllister <[email protected]>
---
depmod.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/depmod.c b/depmod.c
index cbb9992..105df1c 100644
--- a/depmod.c
+++ b/depmod.c
@@ -1401,12 +1401,12 @@ static void parse_alternative(const char *filename,
if (streq(cmd, "moduledir")) {
tmp = strsep_skipspace(&ptr, "\t ");
- if (!tmp || module_dir)
+ if (!tmp || *tmp == '\0' || module_dir)
goto bad_file;
module_dir = NOFAIL(strdup(tmp));
} else if (streq(cmd, "config")) {
tmp = strsep_skipspace(&ptr, "\t ");
- if (!tmp || config_file)
+ if (!tmp || *tmp == '\0' || config_file)
goto bad_file;
config_file = NOFAIL(strdup(tmp));
} else {
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html