Dirk Mueller
44bc099863
- Refresh patches and remove the visibility patch that I upstreamed few releases ago in a different form. OBS-URL: https://build.opensuse.org/request/show/161841 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=75
41 lines
923 B
Plaintext
41 lines
923 B
Plaintext
Index: src/file.c
|
|
===================================================================
|
|
--- src/file.c.orig
|
|
+++ src/file.c
|
|
@@ -195,6 +195,8 @@ main(int argc, char *argv[])
|
|
flags |= MAGIC_DEBUG|MAGIC_CHECK;
|
|
break;
|
|
case 'e':
|
|
+ if (!optarg)
|
|
+ usage();
|
|
for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++)
|
|
if (strcmp(nv[i].name, optarg) == 0)
|
|
break;
|
|
@@ -206,7 +208,7 @@ main(int argc, char *argv[])
|
|
break;
|
|
|
|
case 'f':
|
|
- if(action)
|
|
+ if(action || !optarg)
|
|
usage();
|
|
if (magic == NULL)
|
|
if ((magic = load(magicfile, flags)) == NULL)
|
|
@@ -215,6 +217,8 @@ main(int argc, char *argv[])
|
|
++didsomefiles;
|
|
break;
|
|
case 'F':
|
|
+ if (!optarg)
|
|
+ usage();
|
|
separator = optarg;
|
|
break;
|
|
case 'i':
|
|
@@ -227,6 +231,8 @@ main(int argc, char *argv[])
|
|
action = FILE_LIST;
|
|
break;
|
|
case 'm':
|
|
+ if (!optarg)
|
|
+ usage();
|
|
magicfile = optarg;
|
|
break;
|
|
case 'n':
|