summaryrefslogtreecommitdiff
path: root/grep-dctrl
diff options
context:
space:
mode:
authorAntti-Juhani Kaijanaho <ajk@debian.org>2009-01-06 20:22:18 +0200
committerAntti-Juhani Kaijanaho <ajk@debian.org>2009-01-06 20:22:18 +0200
commit20245f6002bbb3be2a6fa5b781cdb438f2e8d92a (patch)
treef9c72ff964f8215dde06140cf73401130e7cd98d /grep-dctrl
parentd6e022e161cc29b84ada5af0ca862c462debfcfb (diff)
downloaddctrl-tools-20245f6002bbb3be2a6fa5b781cdb438f2e8d92a.tar.gz
Fix #506138 by forbidding such messed up command lines.
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
Diffstat (limited to 'grep-dctrl')
-rw-r--r--grep-dctrl/grep-dctrl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/grep-dctrl/grep-dctrl.c b/grep-dctrl/grep-dctrl.c
index 63936be..70a1fd1 100644
--- a/grep-dctrl/grep-dctrl.c
+++ b/grep-dctrl/grep-dctrl.c
@@ -297,6 +297,11 @@ static void leave(struct arguments * args, int paren)
static void apptok(struct arguments * args, const int tok)
{
debug_message("apptok", 0);
+ if (args->finished) {
+ message(L_FATAL, 0,
+ _("file names are not allowed within the predicate"));
+ fail();
+ }
if (args->in_atom && tok < TOK_ATOM_BASE) {
finish_atom(args);
}