Checking program arguments of test/fake_au. Coverity CID 21832.
This commit is contained in:
parent
7684761afc
commit
e378d8a0e0
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2015.10.23.122644"
|
#define Cdrskin_timestamP "2015.10.23.123606"
|
||||||
|
@ -48,6 +48,11 @@ int main(int argc, char **argv)
|
|||||||
goto help;
|
goto help;
|
||||||
}
|
}
|
||||||
for(i= 1; i<argc; i++) {
|
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(strcmp(argv[i],"-o")==0) {
|
||||||
if(i>=argc-1) {
|
if(i>=argc-1) {
|
||||||
fprintf(stderr,"%s: option -o needs a file address as argument.\n",
|
fprintf(stderr,"%s: option -o needs a file address as argument.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user