exit(2) on unsupported positional arguments on command line

Change-Id: I5398edac755280d2982285802516681aa5255470
This commit is contained in:
Harald Welte 2019-12-03 21:51:05 +01:00
parent 6a25a61142
commit 73f9c02f49
1 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,10 @@ static void handle_options(int argc, char **argv)
break;
};
}
if (argc > optind) {
fprintf(stderr, "Unsupported positional arguments on command line\n");
exit(2);
}
}
/* Callback function to be called when the RSIP ("Reset in Progress") mgcp