summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helper/appliance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/helper/appliance.c b/helper/appliance.c
index b2cc840..c4d0b32 100644
--- a/helper/appliance.c
+++ b/helper/appliance.c
@@ -284,7 +284,9 @@ add_hostfiles (const char *hostfiles_file, struct writer *writer)
if (strchr (hostfile, '*') || strchr (hostfile, '?')) {
char *dirname = xstrdup (hostfile);
char *patt = strrchr (dirname, '/');
- assert (patt);
+ if (!patt)
+ error (EXIT_FAILURE, 0, "%s: line %zu: invalid pattern\n(is this file a supermin appliance hostfiles file?)",
+ hostfiles_file, i+1);
*patt++ = '\0';
char **files = read_dir (dirname);