From abbdbfbbaba26c3c3e6ce9f2971f29c693f8c3b9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 3 Dec 2019 22:19:32 +0100 Subject: [PATCH] msc: exit(2) on unsupported positional arguments on command line Change-Id: Iad858974e9d97ae14f3da6dc21267aafafcda0ef --- src/osmo-msc/msc_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index e7570cde5..cffdaefc3 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -198,6 +198,11 @@ static void handle_options(int argc, char **argv) exit(-1); } } + + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); + } } struct gsm_network *msc_network_alloc(void *ctx,