2022-09-13 22:12:04 +02:00
|
|
|
Index: file-5.43/src/file.c
|
|
|
|
===================================================================
|
|
|
|
--- file-5.43.orig/src/file.c
|
|
|
|
+++ file-5.43/src/file.c
|
2023-07-28 11:56:34 +02:00
|
|
|
@@ -263,6 +263,8 @@ main(int argc, char *argv[])
|
2007-05-17 11:31:52 +02:00
|
|
|
break;
|
|
|
|
case 'e':
|
2020-06-17 17:16:08 +02:00
|
|
|
case OPT_EXCLUDE_QUIET:
|
|
|
|
+ if (!optarg)
|
|
|
|
+ usage();
|
2019-05-27 11:37:06 +02:00
|
|
|
for (i = 0; i < __arraycount(nv); i++)
|
2007-05-17 11:31:52 +02:00
|
|
|
if (strcmp(nv[i].name, optarg) == 0)
|
|
|
|
break;
|
2023-07-28 11:56:34 +02:00
|
|
|
@@ -275,7 +277,7 @@ main(int argc, char *argv[])
|
2007-05-17 11:31:52 +02:00
|
|
|
break;
|
2009-05-06 18:38:39 +02:00
|
|
|
|
2007-05-17 11:31:52 +02:00
|
|
|
case 'f':
|
|
|
|
- if(action)
|
|
|
|
+ if(action || !optarg)
|
|
|
|
usage();
|
2009-05-06 18:38:39 +02:00
|
|
|
if (magic == NULL)
|
|
|
|
if ((magic = load(magicfile, flags)) == NULL)
|
2023-07-28 11:56:34 +02:00
|
|
|
@@ -285,6 +287,8 @@ main(int argc, char *argv[])
|
2007-05-17 11:31:52 +02:00
|
|
|
++didsomefiles;
|
|
|
|
break;
|
|
|
|
case 'F':
|
2020-06-17 17:16:08 +02:00
|
|
|
+ if(!optarg)
|
|
|
|
+ usage();
|
2007-05-17 11:31:52 +02:00
|
|
|
separator = optarg;
|
|
|
|
break;
|
|
|
|
case 'i':
|
2023-07-28 11:56:34 +02:00
|
|
|
@@ -297,6 +301,8 @@ main(int argc, char *argv[])
|
2011-06-14 19:53:47 +02:00
|
|
|
action = FILE_LIST;
|
2007-05-17 11:31:52 +02:00
|
|
|
break;
|
|
|
|
case 'm':
|
2020-06-17 17:16:08 +02:00
|
|
|
+ if(!optarg)
|
|
|
|
+ usage();
|
2007-05-17 11:31:52 +02:00
|
|
|
magicfile = optarg;
|
|
|
|
break;
|
|
|
|
case 'n':
|