commit | cbf23b646552e36ed0b085197477c2d9c7b575ac | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@osmocom.org> | Tue Dec 03 22:14:20 2019 +0100 |
committer | Harald Welte <laforge@osmocom.org> | Wed Dec 04 12:08:33 2019 +0100 |
tree | e051d0d504f1175432778440011b6fec7935284c | |
parent | 50595fb9b5028167c150e4125e813dcd56ee6163 [diff] [blame] |
exit(2) on unsupported positional arguments on command line Change-Id: I6d4efa6ddef41607aecd5ceee78e400db821292f
diff --git a/src/e1_recorder.c b/src/e1_recorder.c index 9110ccb..d085ca5 100644 --- a/src/e1_recorder.c +++ b/src/e1_recorder.c
@@ -123,6 +123,11 @@ break; } } + + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); + } } int main(int argc, char **argv)