aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/e1_recorder.c5
-rw-r--r--src/e1cap_dump.c5
2 files changed, 10 insertions, 0 deletions
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 @@ static void handle_options(int argc, char **argv)
break;
}
}
+
+ if (argc > optind) {
+ fprintf(stderr, "Unsupported positional arguments on command line\n");
+ exit(2);
+ }
}
int main(int argc, char **argv)
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");