msc: exit(2) on unsupported positional arguments on command line

Change-Id: Iad858974e9d97ae14f3da6dc21267aafafcda0ef
This commit is contained in:
Harald Welte 2019-12-03 22:19:32 +01:00
parent db4839c267
commit abbdbfbbab
1 changed files with 5 additions and 0 deletions

View File

@ -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,