aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-03-21 17:49:54 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-03-25 01:53:21 +0200
commit23795567e0fde798b3a3c958fea721323e2d1f3a (patch)
tree0e26d22f95e6d8dc9a52153dde0a6b211710f1e3
parent26f05d98d9ef644b2cca6a664965b0f98d27bd04 (diff)
downloadmailfromd-23795567e0fde798b3a3c958fea721323e2d1f3a.tar.gz
mailfromd-23795567e0fde798b3a3c958fea721323e2d1f3a.tar.bz2
abort on invalid MFL #include argument (backport of fedbf1d7)
* mfd/lex.l (lex_new_source): Fail if an argument to MFL #include is not a regular file.
-rw-r--r--mfd/lex.l3
1 files changed, 3 insertions, 0 deletions
diff --git a/mfd/lex.l b/mfd/lex.l
index c7e17d7a..e9884589 100644
--- a/mfd/lex.l
+++ b/mfd/lex.l
@@ -193,6 +193,9 @@ lex_new_source(const char *name, int flag)
parse_error(_("cannot open `%s': %s"),
name, mu_strerror(errno));
return EX_NOINPUT;
+ } else if (!S_ISREG(st.st_mode)) {
+ parse_error(_("`%s' is not a regular file"), name);
+ return EX_NOINPUT;
}
id.device = st.st_dev;

Return to:

Send suggestions and report system problems to the System administrator.