39 lines
853 B
Plaintext
39 lines
853 B
Plaintext
--- file-5.39/src/file.c.orig 2020-06-17 16:13:36.625305367 +0200
|
|
+++ file-5.39/src/file.c 2020-06-17 16:15:12.429553163 +0200
|
|
@@ -251,6 +251,8 @@
|
|
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;
|
|
@@ -263,7 +265,7 @@
|
|
break;
|
|
|
|
case 'f':
|
|
- if(action)
|
|
+ if(action || !optarg)
|
|
usage();
|
|
if (magic == NULL)
|
|
if ((magic = load(magicfile, flags)) == NULL)
|
|
@@ -273,6 +275,8 @@
|
|
++didsomefiles;
|
|
break;
|
|
case 'F':
|
|
+ if(!optarg)
|
|
+ usage();
|
|
separator = optarg;
|
|
break;
|
|
case 'i':
|
|
@@ -285,6 +289,8 @@
|
|
action = FILE_LIST;
|
|
break;
|
|
case 'm':
|
|
+ if(!optarg)
|
|
+ usage();
|
|
magicfile = optarg;
|
|
break;
|
|
case 'n':
|