41 lines
993 B
Plaintext
41 lines
993 B
Plaintext
Index: file-5.43/src/file.c
|
|
===================================================================
|
|
--- file-5.43.orig/src/file.c
|
|
+++ file-5.43/src/file.c
|
|
@@ -263,6 +263,8 @@ main(int argc, char *argv[])
|
|
break;
|
|
case 'e':
|
|
case OPT_EXCLUDE_QUIET:
|
|
+ if (!optarg)
|
|
+ usage();
|
|
for (i = 0; i < __arraycount(nv); i++)
|
|
if (strcmp(nv[i].name, optarg) == 0)
|
|
break;
|
|
@@ -275,7 +277,7 @@ main(int argc, char *argv[])
|
|
break;
|
|
|
|
case 'f':
|
|
- if(action)
|
|
+ if(action || !optarg)
|
|
usage();
|
|
if (magic == NULL)
|
|
if ((magic = load(magicfile, flags)) == NULL)
|
|
@@ -285,6 +287,8 @@ main(int argc, char *argv[])
|
|
++didsomefiles;
|
|
break;
|
|
case 'F':
|
|
+ if(!optarg)
|
|
+ usage();
|
|
separator = optarg;
|
|
break;
|
|
case 'i':
|
|
@@ -297,6 +301,8 @@ main(int argc, char *argv[])
|
|
action = FILE_LIST;
|
|
break;
|
|
case 'm':
|
|
+ if(!optarg)
|
|
+ usage();
|
|
magicfile = optarg;
|
|
break;
|
|
case 'n':
|