commit | 278a6c8fcfc04084cd459a990ad93077b2a9cab0 | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@osmocom.org> | Tue Dec 03 21:35:12 2019 +0100 |
committer | Harald Welte <laforge@osmocom.org> | Tue Dec 03 21:35:48 2019 +0100 |
tree | a2fdaf3365aa89dfbb47675fa4736fee38c0b77f | |
parent | f7404bb4731be116185c1ee9aa6c8e9dd0a90663 [diff] [blame] |
utils: exit(2) on unsupported positional arguments on command line Change-Id: Icc76cae2225ec4e664b950176dd861fa15712f59
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index ec9bad8..65cfa31 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c
@@ -247,6 +247,11 @@ } } + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments in command line\n"); + exit(2); + } + if (!rand_is_set) { rc = osmo_get_rand_id(_rand, 16); if (rc < 0) {