diff options
author | Harald Welte <laforge@osmocom.org> | 2019-12-03 21:51:05 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2019-12-03 21:51:05 +0100 |
commit | 73f9c02f49dcf6fff47ddac63f0fe6e329a5c95c (patch) | |
tree | 8a4ec1a9da2fb551e558757c2594d784e5cd2a1a | |
parent | 6a25a61142da9f8b75dc1c1431e7455cb45cd390 (diff) |
exit(2) on unsupported positional arguments on command line
Change-Id: I5398edac755280d2982285802516681aa5255470
-rw-r--r-- | src/osmo-mgw/mgw_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index adc1751bc..4168e0dc3 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -132,6 +132,10 @@ static void handle_options(int argc, char **argv) break; }; } + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); + } } /* Callback function to be called when the RSIP ("Reset in Progress") mgcp |