diff options
author | Harald Welte <laforge@osmocom.org> | 2019-12-03 22:14:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2019-12-04 12:08:33 +0100 |
commit | cbf23b646552e36ed0b085197477c2d9c7b575ac (patch) | |
tree | e051d0d504f1175432778440011b6fec7935284c /src/e1cap_dump.c | |
parent | 50595fb9b5028167c150e4125e813dcd56ee6163 (diff) |
exit(2) on unsupported positional arguments on command line
Change-Id: I6d4efa6ddef41607aecd5ceee78e400db821292f
Diffstat (limited to 'src/e1cap_dump.c')
-rw-r--r-- | src/e1cap_dump.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index c172b55..73be84b 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -275,6 +275,11 @@ int main(int argc, char **argv) exit(2); } + if (argc > optind+1) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); + } + f = osmo_e1cap_open(NULL, argv[optind++]); if (!f) { fprintf(stderr, "Unable to open input file\n"); |