aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-03 21:51:05 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-03 21:51:05 +0100
commit73f9c02f49dcf6fff47ddac63f0fe6e329a5c95c (patch)
tree8a4ec1a9da2fb551e558757c2594d784e5cd2a1a
parent6a25a61142da9f8b75dc1c1431e7455cb45cd390 (diff)
exit(2) on unsupported positional arguments on command line
-rw-r--r--src/osmo-mgw/mgw_main.c4
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