From 85d997620ea1bfb5d7ac186d3b54107f2b4c16ff Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 14 Feb 2022 22:04:29 -0500 Subject: [PATCH] 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) --- usr.bin/elfctl/elfctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c index 9463372f674..993349d4ec4 100644 --- a/usr.bin/elfctl/elfctl.c +++ b/usr.bin/elfctl/elfctl.c @@ -116,6 +116,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;