Checking program arguments of test/fake_au. Coverity CID 21832.

This commit is contained in:
Thomas Schmitt 2015-10-23 12:37:34 +00:00
parent ab11ce2a0e
commit 22719b880e
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2015.10.23.122644"
#define Cdrskin_timestamP "2015.10.23.123606"

View File

@ -48,6 +48,11 @@ int main(int argc, char **argv)
goto help;
}
for(i= 1; i<argc; i++) {
if(strlen(argv[i]) >= 4096) {
fprintf(stderr,"%s: argument at position %d is much too long.\n",
argv[0], i);
exit(1);
}
if(strcmp(argv[i],"-o")==0) {
if(i>=argc-1) {
fprintf(stderr,"%s: option -o needs a file address as argument.\n",