From 501d053b70ea8ed0aa9e0f6d57d403e982afe2ec Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 3 Dec 2019 21:41:13 +0100 Subject: trx: exit() on unsupported positional arguments on command line Change-Id: Ifeea65a359e9ca307efb2c721fd0fb6f0959e976 --- Transceiver52M/osmo-trx.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.3-59-g8ed1b