diff options
author | Harald Welte <laforge@osmocom.org> | 2019-12-03 21:41:13 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2019-12-03 21:41:38 +0100 |
commit | 501d053b70ea8ed0aa9e0f6d57d403e982afe2ec (patch) | |
tree | 491e01308918e583146433ffbfe3d3aab3f28a92 | |
parent | 0fafe03199e6d5d02af894b5d29f394a7c9c821d (diff) |
trx: exit() on unsupported positional arguments on command line
Change-Id: Ifeea65a359e9ca307efb2c721fd0fb6f0959e976
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 2346488..16047a9 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -381,6 +381,11 @@ static void handle_options(int argc, char **argv, struct trx_ctx* trx) } } + if (argc > optind) { + LOG(ERROR) << "Unsupported positional arguments on command line"; + goto bad_config; + } + /* Cmd line option specific validation & setup */ if (trx->cfg.num_chans > TRX_CHAN_MAX) { |