aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2022-02-15 03:04:29 +0000
committerEd Maste <emaste@FreeBSD.org>2022-02-18 00:33:47 +0000
commita528bad95e0c80fe612051076d53b8bc8283e239 (patch)
treefa9b545d2ff8e5ae2aa6110ee8db1511d53623ac
parentbbb92ab05fa2d039905ef988ca31b4356b01d964 (diff)
elfctl: error if -e is specified multiple times
Reported by: jrm MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit f0cf9b602dc0375dfc279500e0314b7c55273bf0)
-rw-r--r--usr.bin/elfctl/elfctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
index 1042712f828a..b4482f82e7ef 100644
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -120,6 +120,8 @@ main(int argc, char **argv)
lflag = true;
break;
case 'e':
+ if (features != NULL)
+ errx(1, "-e may be specified only once");
features = optarg;
editfeatures = true;
break;