commit | cc0914d018159844e4dc1045b1cf155c1aa615be | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@osmocom.org> | Tue Dec 03 21:52:49 2019 +0100 |
committer | Harald Welte <laforge@osmocom.org> | Tue Dec 03 21:53:08 2019 +0100 |
tree | 9c7bfca8b79f7a5347666b014b023579555bfbdf | |
parent | 6d839f535429c4ffe1453f4619475d3fb70e1330 [diff] |
exit(2) on unsupported positional arguments on command line Change-Id: Id33caf93325074f9e5b2b322ac497b1c21c3f406
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 @@ break; } } + + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); + } } CTRL_CMD_DEFINE_RO(hnb_info, "info");