aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-03 21:52:49 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-03 21:53:08 +0100
commitcc0914d018159844e4dc1045b1cf155c1aa615be (patch)
tree9c7bfca8b79f7a5347666b014b023579555bfbdf /src
parent6d839f535429c4ffe1453f4619475d3fb70e1330 (diff)
exit(2) on unsupported positional arguments on command line
Diffstat (limited to 'src')
-rw-r--r--src/hnbgw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 9dc67a2..0db04af 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -455,6 +455,11 @@ static void handle_options(int argc, char **argv)
break;
}
}
+
+ if (argc > optind) {
+ fprintf(stderr, "Unsupported positional arguments on command line\n");
+ exit(2);
+ }
}
CTRL_CMD_DEFINE_RO(hnb_info, "info");