summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-11-08 16:57:42 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-11-08 16:57:42 +0000
commitf54eb2d6ca43f5a8e44a80cad1a1fba7f37fb846 (patch)
tree0094635b36eae7fd5e953563b6ddebfe34085eb9 /sbin
parent95d5c9837745945f60f71500bac2d42a6b94bef5 (diff)
Do not accept superfluous arguments.
From Klemens Nanni. ok markus@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/iked.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c
index 61079167c2a..09fef3ea877 100644
--- a/sbin/iked/iked.c
+++ b/sbin/iked/iked.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.c,v 1.34 2017/03/23 05:29:48 jsg Exp $ */
+/* $OpenBSD: iked.c,v 1.35 2017/11/08 16:57:41 patrick Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -110,6 +110,11 @@ main(int argc, char *argv[])
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
+
if ((env = calloc(1, sizeof(*env))) == NULL)
fatal("calloc: env");